My favorites | Sign in
Project Home Wiki Issues Source
Search
for
IGUIScrollViewImage  
Horizontal UIScrollView with images
Featured, Phase-Implementation
Updated Apr 12, 2010 by ondrej.r...@gmail.com

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.

Comment by findscan...@gmail.com, Apr 15, 2010

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?

Comment by akarargy...@gmail.com, Sep 9, 2010

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!


Sign in to add a comment
Powered by Google Project Hosting