设置启动页图
来源:互联网 发布:机智交易软件 编辑:程序博客网 时间:2024/04/28 18:15
若想简单的实现添加一张网络的启动图或者动态的启动图可使用改方法:
在appdelegate中的didFinishLaunchingWithOptions方法中写:
//启动页
@property (strong, nonatomic) UIView *ADView;
@property (strong, nonatomic) UIImageView *imageV;
{
[self.window makeKeyAndVisible];
UIViewController *vc = (UIViewController *)[launchStoryboard instantiateViewControllerWithIdentifier:@"LaunchScreen"];
self.ADView = (UIView *)vc.view;
self.ADView.frame = CGRectMake(0, 0, UISCREEN.width, UISCREEN.height);
[self.window addSubview:self.ADView];
self.imageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN.width, UISCREEN.height)];
//若不图片的地址是动态的,则还需进行网络请求,但在 didFinishLaunchingWithOptions方法中不宜使用线程下载网络资源.
[self.ADView addSubview:self.imageV];
[self.window bringSubviewToFront:self.ADView];
[NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(removeADView) userInfo:nil repeats:NO];
return YES;
}
在removeADView该方法中移除添加的view
这只是实现简单的需求,若复杂的需求还需在启动是创建VC,在VC中添加所要实现的功能
0 0
- 设置启动页图
- ios 设置启动页
- ios启动页设置
- 设置启动页
- ios启动页设置
- 启动页设置 iOS
- iOS启动页设置
- 启动页的设置
- Android设置启动页
- Xcode6设置启动图
- iOS设置启动图
- IOS启动图设置
- LanuchImage启动图设置
- Xcode开发启动页设置
- 设置App的启动页
- iOS 图片启动页设置
- iOS启动页的设置
- iOS 启动页的设置
- 基于cryptopp -- A Password Manager密码管理系统
- The attribute locations is undefined for the annotation type ContextConfiguration
- 利用AuthorizeAttribute属性简单避免 MVC 中的跨域攻击
- 在ListView中实现异步加载
- 后台定位上传的代码实践
- 设置启动页图
- 给MFC对话框控件添加工具提示Tips
- java web HttpClient 开发一个接口
- poj 1141(区间dp+打印路径)
- Yii之路(第八)
- 推送对账文件的3种
- springmvc 定义拦截器
- Android studio下的Android JNI调用以及动态链接库.so的生成
- 在GitHub上下载Demo 运行时候会出现The sandbox is not sync with the Podfile.lock