星空网 > 软件开发 > 操作系统

【代码笔记】旋转的图片

一,效果图。

【代码笔记】旋转的图片images/loading.gif' data-original="http://images2015.cnblogs.com/blog/337518/201510/337518-20151013131927569-518058929.jpg" width="217" height="400" />

二,工程图。

【代码笔记】旋转的图片

三,代码。

AppDelegate.h

【代码笔记】旋转的图片
#import <UIKit/UIKit.h>@interface AppDelegate : UIResponder <UIApplicationDelegate>@property (strong, nonatomic) UIWindow *window;@end
【代码笔记】旋转的图片

 

AppDelegate.m

【代码笔记】旋转的图片
#import "AppDelegate.h"#import "RootViewController.h"@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];  // Override point for customization after application launch.    RootViewController *rootVC=[[RootViewController alloc]init];  UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:rootVC];  self.window.rootViewController=nav;    self.window.backgroundColor = [UIColor whiteColor];  [self.window makeKeyAndVisible];  return YES;}
【代码笔记】旋转的图片

 

RootViewController.h

【代码笔记】旋转的图片
#import <UIKit/UIKit.h>@class MainPageView;@interface RootViewController : UIViewController{  MainPageView* mainPageView;}@property (nonatomic,retain) MainPageView* mainPageView;@end
【代码笔记】旋转的图片

 

RootViewController.m

【代码笔记】旋转的图片
#import "RootViewController.h"//加入头文件#import "MainPageView.h"@interface RootViewController ()@end@implementation RootViewController@synthesize mainPageView;- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{  self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];  if (self) {    // Custom initialization  }  return self;}- (void)viewDidLoad{  [super viewDidLoad];  // Do any additional setup after loading the view.      mainPageView = [[MainPageView alloc] initWithFrame:CGRectMake(0, 20, 320, 460)];  mainPageView.backgroundColor = [UIColor lightGrayColor];  [mainPageView initDrawViewData];  self.view = mainPageView;}- (void)didReceiveMemoryWarning{  [super didReceiveMemoryWarning];  // Dispose of any resources that can be recreated.}
【代码笔记】旋转的图片

 

 


 

原标题:【代码笔记】旋转的图片

关键词:图片

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

Shopee运营常见问题解答:新手运营如何设置广告?促销活动怎么做?:https://www.goluckyvip.com/news/987.html
Shopee测评自养号下单最新养号攻略 :https://www.goluckyvip.com/news/9870.html
海外本土化、经营数字化,物流企业需要注意哪些问题? :https://www.goluckyvip.com/news/9871.html
SHEIN欧洲上线新配送服务;极兔国际推出马来西亚跨境专线 :https://www.goluckyvip.com/news/9872.html
海外最受欢迎的TikTok短视频做品牌出海有哪些投放方式 :https://www.goluckyvip.com/news/9873.html
分享日本TikTok短视频广告推广投放技巧攻略 :https://www.goluckyvip.com/news/9874.html
探讨内地人开设香港账户的可行性 :https://www.kjdsnews.com/a/1836442.html
在古巴做游轮 古巴旅游项目:https://www.vstour.cn/a/363194.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流