Table View like in Instagram app
-
08-12-2019 - |
Question
In Instagram app when you add new photo you can see this table:
How can i create it? Any ideas
Solution
@Eugene its a group table
with multiple sections. If you don't know how to create group table then have a look at this tutorial - http://www.mobisoftinfotech.com/blog/iphone/iphone-uitableview-tutorial-grouped-table/
OTHER TIPS
- (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style
here you can specify UITableViewStyleGrouped
as the style to get the grouped tableview you see..
Table view datasource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
here you should return the no..of section in the table (above image has 2 sections ..)
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
the above method is used to specify the title for the section..in the above image(first section does not have a title...return "Sharing" for second)
Rest is done in :
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
here you can provide a custom text for the cell...change its font...show accessory in the cells..add images to the cell..