启动页放12张图每次启动随机显示其中的一张的代码

12张图片命名合理一点,NSInteger minute = [[[NSCalendar currentCalendar] components:NSMinuteCalendarUnit fromDate:[NSDate date]] minute];
   
    splashView = [[UIImageView alloc] initWithFrame:self.window.frame];
    splashView.autoresizingMask = (UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight);
    splashView.image = [UIImage imageNamed:[NSString stringWithFormat:@"splash%d.png", minute % SPLASH_IMG_COUNT]];


图片命名有规律:12张图片比如说,image1.png,image2.png,^

posted @ 2014-03-14 14:06  曈曈7添  阅读(262)  评论(0编辑  收藏  举报