功能分析
点击箭头切换序号、图片、描述
如果是首张图片,左边箭头不能点击
如果是尾张图片,右边箭头不能点击
步骤分析
搭建UI界面
监听按钮点击
切换序号、图片、描述
让UILabel的文字居中显示
@PRoperty (strong, nonatomic) NSArray *images;
NSBundle *bundle = [NSBundle mainBundle]; NSString *path = [bundle pathForResource:@"imageData" ofType:@"plist"];
- (NSArray *)images
{
if (_images == nil)
{
NSBundle *bundle = [NSBundle mainBundle];
NSString *path = [bundle pathForResource:@"imageData" ofType:@"plist"];
_images = [NSArray arrayWithContentsOfFile:path];
}
return _images;
}
新闻热点
疑难解答