本文小白 仅供提醒.
IOS开发 开机动画
1) 程序内部开机动画
Lanuch Image存放
2) 接口程序的开机动画 使用AFNetWorking解析 添加UIImageView在UITabBar上
// 大小
UIImageView *picImageView = [[UIImageView alloc] initWithFrame:tab.view.bounds];
picImageView.image = [UIImage imageNamed:@"Default2.png"];
[tab.view addSubview:picImageView];
// 开机动画的创作
AFHTTPRequestOperationManager *manger = [[AFHTTPRequestOperationManager alloc] init];
manger.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
NSString *string = [NSString stringWithFormat:@"http://mapi.4399api.net/app/iphone/v2.1/index-startAd.html?version=38"];
[manger GET:string parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSString *picString = [[responseObject objectForKey:@"result"] objectForKey:@"adimage"];
NSLog(@"000000000000000%@", picString);
[picImageView setImageWithURL:[NSURL URLWithString:picString]];
NSLog(@"0000000000000000001");
[UIView animateWithDuration:2 animations:^{
picImageView.alpha = 0;
}];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
}];
[manger release];
//释放
[view release];