-
(BOOL)application:(UIApplication
*)application didFinishLaunchingWithOptions:(NSDictionary
*)launchOptions
{
CGRect
appFrame = CGRectMake(0,
0,
320,
460);
UIView
*view = [[UIView
alloc]
initWithFrame:appFrame];
myView
= view;
view.backgroundColor
= [UIColor
redColor];
view.autoresizingMask
= UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
splashImgView
= [[UIImageView
alloc]
initWithImage:[UIImage
imageNamed:@"Default.png"]];
splashImgView.frame=myView.frame;
//timer
= [NSTimer scheduledTimerWithTimeInterval:4.0 target:self
selector:@selector(fadeScreen) userInfo:nil repeats:NO];
[myView
addSubview:splashImgView];
[self.window
addSubview:myView];
}
-
(void)fadeScreen
{
NSLog(@"fadeScreen");
[UIView
beginAnimations:nil
context:nil];
[UIView
setAnimationDuration:0.75];
[UIView
setAnimationDelegate:self];
//[UIView
setAnimationDidStopSelector:@selector(finishedFading)];
myView.alpha
= 2.0;
[UIView
commitAnimations];
}
No comments:
Post a Comment