iOS源碼下載:文字+圖片的滾動視圖
作者:佚名
這是一款結合問題和圖片的滾動視圖,可以左右滾動內(nèi)容,并且顯示文字說明。
功能分類:其他
支持平臺:iOS
運行環(huán)境:iOS
開發(fā)語言:Object-c
開發(fā)工具:Xcode
源碼大?。?.22MB
源碼下載地址:http://down.51cto.com/data/1976925
源碼簡介
這是一款結合問題和圖片的滾動視圖,可以左右滾動內(nèi)容,并且顯示文字說明。
源碼運行截圖
效果圖
源碼片段
- - (void)viewDidAppear:(BOOL)animated
- {
- [super viewDidAppear:animated];
- NSString *path = [[NSBundle mainBundle] pathForResource:
- @"Places" ofType:@"plist"];
- NSMutableArray *placeArray = [[NSMutableArray alloc] initWithContentsOfFile:path];
- NSMutableArray *array = [[NSMutableArray alloc] init];
- for (int i =0 ; i < [placeArray count] ; i++){
- NSDictionary *dict = [placeArray objectAtIndex:i];
- PJRItems *item = [[PJRItems alloc] init];
- item.itemTitle = [dict objectForKey:@"placeName"];
- item.itemDesc = [dict objectForKey:@"placeDesc"];
- item.itemImage = [dict objectForKey:@"placeImage"];
- [array addObject:item];
- }
- PJRPageScrollingView *pagScrollView = [[PJRPageScrollingView alloc] initWithFrame:self.view.bounds withNumberOfItems:array];
- [self.view addSubview:pagScrollView];
- }
責任編輯:閆佳明
來源:
網(wǎng)絡整理