更换启动图片后的广告图片
来源:互联网 发布:今天怎么登录不上淘宝 编辑:程序博客网 时间:2024/04/27 16:34
转自:http://www.cocoachina.com/bbs/read.php?tid-251333-page-1.html
转自:http://www.wahenzan.com/a/mdev/ios/2015/0327/1688.html
转载请注明出处:http://www.wahenzan.com/a/mdev/ios/2015/0326/1688.html来源:哇很赞(www.wahenzan.com)
之前很奇怪app启动之后的广告展示是怎么处理的,特意试了下效果,
下面是我简单实现的一个广告展示效果
代码如下:
在AppDelegate.h中的代码
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UIImageView *adImageView;
@property (strong, nonatomic) UINavigationController *rootNavi;
@end
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
AlertDemoViewController *vc = [[AlertDemoViewController alloc]init];
UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:vc];
if (isIOS7) {
[navi.navigationBar setBarTintColor:[UIColor clearColor]];
}else{
[navi.navigationBar setTintColor:[UIColor clearColor]];
}
self.rootNavi = navi;
//self.window.rootViewController = navi;
self.adImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height)];
[self.adImageView setImage:[UIImage imageNamed:@"tmplecture"]];
[self.window addSubview:self.adImageView];
[self performSelector:@selector(removeAdImageView) withObject:nilafterDelay:3];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
- (void)removeAdImageView
{
[UIView animateWithDuration:0.3f animations:^{
self.adImageView.transform = CGAffineTransformMakeScale(0.5f, 0.5f);
self.adImageView.alpha = 0.f;
} completion:^(BOOL finished) {
[self.adImageView removeFromSuperview];
self.window.rootViewController = self.rootNavi;
}];
}
转载请注明出处:http://www.wahenzan.com/a/mdev/ios/2015/0326/1688.html
- 更换启动图片后的广告图片
- 更换启动图片
- 更换kernel启动logo图片
- ios app启动图片,之后的广告图片效果
- iOS 启动图片,之后的广告图片效果
- 我想更换 Webmail 的 LOGO 图片、广告图片和提示信息,
- DEDECMS更换目录后需要修改的图片路径
- 【转载】linux更换启动时的小企鹅图片(转载)
- android tab点击后更换图片
- 浮动的图片广告
- 浮动的图片广告
- 更换图片
- 启动图片和启动广告设置
- Android WelcomeActivity 启动画更换网络图片
- 通过设置图片实现app启动广告页的效果
- 更换android的初始化图片
- 更换android的初始化图片
- 如何更换RatingBar的图片
- 接口回调的原理:接口变量 调用 被类实现的接口的方法
- Java中自定义Stack的Demo
- Android之App Manifest
- svn服务器搭建和eclipce svn插件 注意事项
- CSS模式之三权分立
- 更换启动图片后的广告图片
- 九章算法面试题16 01随机生成函数
- 关于语音录制的代码,很经典!
- 抽象工厂模式
- 一粒神补肾养肾官网
- VC++ dll 导出名详解
- mongodb的用户认证
- requestWindowFeature使用详解
- java List.get