- (BOOL)application:(UIApplication *)applicationdidFinishLaunchingWithOp
tions:(NSDictionary *)launchOptions {
self.window= [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen]bounds]];
// Overridepoint for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.windowmakeKeyAndVisible];
//正题
NSMutableArray *arr = [NSMutableArrayarray];
for (int i =1; i < 19 ; i ++) {
UIImage *image = [UIImage imageNamed:[NSStringstringWithFormat:@"37d4642515764c3f685710eb
482753d5-%d.tiff" ,i]];
[arr addObject:image];
}
UIImageView*view = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100,200, 200)];
view.animationImages = arr;
view.animationRepeatCount = 0;
view.animationDuration = 5;
[viewstartAnimating];
[self.windowaddSubview:view];
[NSTimerscheduledTimerWithTimeIn
terval:.4 target:selfselector:@selector(dingshiqi) userInfo:nil repeats:YES];
returnYES;
}
- (void)dingshiqi
{
CGRect _rect= ((UIImageView *)self.window.subviews[0]).frame;
_rect.origin.x = _rect.origin.x - 5;
if(_rect.origin.x < -50 ) {
_rect.origin.x = 375;
}
((UIImageView *)self.window.subviews[0]).frame = _rect;
}
//正题
}
- (void)dingshiqi
{
}