Introduction
Use this class if you want to horizontal UIScrollView with images and pagination.
Details
Example:
- (NSArray *)getImages {
NSMutableArray *arr = [[[NSMutableArray alloc] init] autorelease];
[arr addObject:[UIImage imageNamed:@"1.jpg"]];
[arr addObject:[UIImage imageNamed:@"2.jpg"]];
[arr addObject:[UIImage imageNamed:@"3.jpg"]];
[arr addObject:[UIImage imageNamed:@"4.jpg"]];
[arr addObject:[UIImage imageNamed:@"5.jpg"]];
[arr addObject:[UIImage imageNamed:@"6.jpg"]];
[arr addObject:[UIImage imageNamed:@"7.jpg"]];
return (NSArray *)arr;
}
- (void)viewDidLoad {
IGUIScrollViewImage *svimage = [[IGUIScrollViewImage alloc] init];
[svimage setContentArray:[self getImages]];
[svimage setSizeFromParentView:self.myUIView];
[svimage enablePageControlOnBottom];
[self.myUIView addSubview:[svimage getWithPositionMemory]];
}
Please look at the header file as there is few more methods you can use to customize your view.
This is a nice little package. I'm trying to get it to work but all I get is a black screen with paging. I've tried setting the background color but that doesn't seem to work. I'm using .png files, would that affect it? Also how do you go about dismissing the scrollview on a button press?
Any update on the code? I am trying to build a UIViewController example using "libIGUILibrary.a" and "IGUIScrollViewCanvas.h" and "IGUIScrollViewCanvas.m" but with no luck. I created an XIB which includes a pageControl and ScrollView?. I associated them with the ScrollView? and PageControl?. It seems that none of the methods inside "IGUIScrollViewCanvas.m" runs. Any hint? Are you posting any example soon? Thank you!