读书人

UIView小结

发布时间: 2012-07-01 13:15:00 作者: rapoo

UIView总结

如果想调用某个类的某个方法可以写成这样,这个方法来自NSObject类

?

// Load butterfly imagesNSMutableArray *bflies = [NSMutableArray array];for (int i = 1; i <= 17; i++){[bflies addObject:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"bf_%d", i] ofType:@"png"]]];}UIImageView *butterflyView = [[UIImageView alloc] initWithFrame:CGRectMake(40.0f, 300.0f, 60.0f, 60.0f)];butterflyView.tag = 300;        //设置动画的图片butterflyView.animationImages = bflies;        //设置时间butterflyView.animationDuration = 0.75f;[self.view addSubview:butterflyView];        //开始动画[butterflyView startAnimating];[butterflyView release];
?

?

预留

预留

预留

预留

预留

预留

读书人网 >移动开发

热点推荐