Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- self.window.backgroundColor = [UIColor whiteColor];
- [self.window makeKeyAndVisible];
- UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
- view.backgroundColor = [UIColor yellowColor];
- [self.window addSubview:view];
- void (^keyframe1)(void) = ^{
- view.frame = CGRectMake(100,100,100,100);
- view.backgroundColor = [UIColor redColor];
- };
- void (^keyframe2)(void) = ^{
- view.backgroundColor = [UIColor blackColor];
- };
- [UIView animateWithDuration:3 animations:keyframe1 completion:^(BOOL finished) {
- [UIView animateWithDuration:3 animations:keyframe2];
- }];
- return YES;
- }
Add Comment
Please, Sign In to add comment