Posts Tagged ‘image gallery’

Zoom-rotate image gallery with UIScrollView

Friday, May 20th, 2011

There is a great and easy solution to display an image gallery with zooming and panning option using the built-in zooming and autoresizing tools: Tutorial here

EmailShare

Image Gallery on iPhone using UITableView

Monday, December 13th, 2010

Another solution for creating an image gallery is using a rotated UITableView as you can find on Stackoverflow.com!
in the view controller rotate the tableView in viewDidLoad:

The solution is also pasted here:


-(void)viewDidLoad {
self.table.rowHeight = 320.0;
self.table.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
// Rotates the view.
CGAffineTransform transform = CGAffineTransformMakeRotation(-1.5707963);
self.table.transform = transform;
// Repositions and resizes the view.
CGRect contentRect = CGRectMake(0, 90, 320, 300);
self.table.frame = contentRect;
self.table.pagingEnabled = YES;
[super viewDidLoad];
}

but you will have cell rotated 90°!!! I solved rotating cellView -90°


- (void)tableView:(UITableView*) tableView willDisplayCell:(UITableViewCell*) cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
CGAffineTransform transform = CGAffineTransformMakeRotation(1.5707963);
cell.transform = transform;
}

EmailShare

Image gallery on iPhone with UIScrollView

Wednesday, November 17th, 2010

Very good solution including source code with XCode project:

http://kwigbo.com/post/758575763/uiscrollview-image-gallery-tutorial

EmailShare