Reputation: 1692
I am building an app in which I got stuck at a position where I need to do something like commenting on photo in Facebook.
There should be image at top and we can be able to add comment in lower portion. Now, my question is how can this be achieved - I think I have two option- 1.Go with custom UIView and go on increasing Uiview. 2. Go with table view.
Any idea, how we can be able to achieve this thing.
Upvotes: 1
Views: 562
Reputation: 56625
Definitely a UITableView
with a custom UITableViewCell
with a UIImageView
for the picture and a few UILabels
for each different text (name, comment, time etc). Then you need to be able to calculate the height of each individual row in
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
The bottom most part where the user enters their new comment should be a separate view with a UIButton
and a UITextField
Upvotes: 3