功能分析
點擊箭頭切換序號、圖片、描述
如果是首張圖片,左邊箭頭不能點擊
如果是尾張圖片,右邊箭頭不能點擊
步驟分析
搭建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;
}
新聞熱點
疑難解答