开发是一件很有趣的事,偶尔在程序中添加一些小东西,会给你的应用增色不少。比如,当你的某些功能暂时还不准备上线时,可以先一个放展示Gif动态图的UIWebView上去,既可以告诉用户APP以后会有的功能,也会使你的APP手动可爱,打动一大波妹子。
#import "ViewController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIWebView *myWalletWebView;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initWithPictureAnimation];
}
-(void)initWithPictureAnimation{
self.myWalletWebView.backgroundColor = [UIColor lightGrayColor];
NSData *gif = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"myWallet" ofType:@"gif"]];
self.myWalletWebView.userInteractionEnabled = NO;
[self.myWalletWebView loadData:gif MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];
NSLog(@"hehe");
}
@end
时间: 2024-10-10 17:10:47