Create an editable grid view like iBooks
Some similar questions have been asked regarding Grid views, but no one got a sufficient answer (some of them went unanswered since the SDKs were under the NDA at the time).
The question is, can anyone please direct me to a tutorial or explain to me what steps to take to create a Grid View like iBooks or Yahoo! An iPhone entertainment app?
Here's a screenshot of what I mean.
a source to share
AQGridView
came out over the weekend (due to the iPadDevCamp contest) that makes a grid look. However, I'm not sure if this is being edited. If it isn't, it's open source ....
It was designed as a version of the iPhone NSCollectionView
that supports automatic layout. AQGridView
will also pay for your cells. It is very similar UITableView
from a developer's point of view.
Announcement: http://quatermain.tumblr.com/post/528737778/aqgridview-lives-for-my-ipad-dev-camp-hackathon
a source to share
I don't know about iPad, but these grid view types are always implemented as UITableView
with custom cells on iPhone. One example of this is the Apple Photos app. It looks like a 4-column grid, but it is actually a tabular view and each cell has 4 photos in it.
If you're looking for sample code, check out Three20's project:
a source to share
I would just put a bunch of UIButtons in the view. You can do it in IB, or just do it in code like:
self.newsView = [UIButton buttonWithType:UIButtonTypeCustom];
[self.newsView setImage:[UIImage imageNamed:@"news.png"] forState:UIControlStateNormal];
[self.newsView addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
self.newsView.tag = 1;
... where the tag property is used to keep track of what the button means. Then, in the buttonAction method, look at the tag to determine what action to take.
a source to share