iOS源碼下載:文字+圖片的滾動視圖
功能分類:其他
支援平台:iOS
運行環境:iOS
開發語言:Object-c
開發工具:Xcode
源碼大小:1.22MB
源碼:http://down.51cto.com/data/1976925
源碼簡介
這是一款結合問題和圖片的滾動視圖,可以左右滾動內容,並且顯示文字說明。
源碼運行
源碼片段
- - (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];
-
- }
源碼:http://down.51cto.com/data/1976925