1.
把想显示的图片命名为:default.png 加入到工程
程序会自动识别,先显示图片后进入工程
2.
[NSThread sleepForTimeInterval:3];
3.
然后新建一个NSTimer.
logoviewcon *lo = [[logoviewcon alloc] initWithNibName:@"logoviewcon" bundle:nil];
self.logo = lo;
[lo release];
[window addSubview:self.logo.view];
//初始化timmer
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval: 1.5 target: self selector: @selector(logo:) userInfo: nil repeats: YES];
注意,初始化的代码中有这么一段:@selector(logo:),其中的方法就是当这个1.5秒时间过去之后自动调用的方法。
-(void) logo:(NSTimer*)timer{
[logo.view removeFromSuperview];
[timer invalidate];//这句代码用来终止timmer,否则,每过1.5秒,就会执行该方法一次,我们是要在开始的时候执行一次就够了。
}
参考:
http://tr4work.blog.163.com/blog/static/137149314201012035023726/
把想显示的图片命名为:default.png 加入到工程
程序会自动识别,先显示图片后进入工程
2.
[NSThread sleepForTimeInterval:3];
3.
然后新建一个NSTimer.
logoviewcon *lo = [[logoviewcon alloc] initWithNibName:@"logoviewcon" bundle:nil];
self.logo = lo;
[lo release];
[window addSubview:self.logo.view];
//初始化timmer
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval: 1.5 target: self selector: @selector(logo:) userInfo: nil repeats: YES];
注意,初始化的代码中有这么一段:@selector(logo:),其中的方法就是当这个1.5秒时间过去之后自动调用的方法。
-(void) logo:(NSTimer*)timer{
[logo.view removeFromSuperview];
[timer invalidate];//这句代码用来终止timmer,否则,每过1.5秒,就会执行该方法一次,我们是要在开始的时候执行一次就够了。
}
参考:
http://tr4work.blog.163.com/blog/static/137149314201012035023726/
996

被折叠的 条评论
为什么被折叠?



