功能分类:其他
支持平台: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];
- }