split UITableView in iPhone - iphone

In the amazon iphone app home page there is a grouped table view that has two cells on one row. How can I recreate this?

I would expect, that it is one cell, that shows different information. You can find a lot of informations about customizing UITableViewCells
iPhone Tutorial: Creating a custom Table View Cell
Customize that UIViewCell – Part 1: Using Interface Builder

Go to your interface builder, click on your TableView and press command+1 to bring up the Table View Attributes. There on the first section Table View Style. Change it to "grouped".

Related

Difference between table view controller and a table view placed within a viewcontroller

I am making an app and would like to direct my user once they log in into their dashboard, I have seen some apps display things in what seem like a table view controller or a view controller with a table view. I would like to display the logo up top and then a table displaying their username then about 4 more rows displaying other info then at the bottom a tab bar. What would be the best way to go about this?
any advice welcomed. If relevant I am using swift, Xcode7 and parse to handle my users
Use a UITableView. This a bit more customizable in terms of Storyboard layout. You can place UIImageViews, toolbars, and other elements all over your UIViewController. You can then put a UITableView in the exact place that would work for you, with the dimensions you need.
Of course, you could always use a UITableViewController. You could embed this controller in a variety of combinations, which would let you add tab bars or navigation bars.
The only real difference in implementation is that you have to remember to explicitly write the delegate and data source methods when using a UITableView.
For your case, I would pick whatever seems easiest to implement in your case. Probably a UITableView in my opinion.
Some differences between UITableViewController (TV) and UIViewController with TableView (VT) I know:
You can add other controls into VT and pin it to anywhere you want. TV can't do that.
You can add many same group of controls without add constraints with TV. VT you have to add constraints.
You don't want to worry about scrolling in TV with many group of controls.
With TV you can create static table cell but you can't with VT. Static table works on TableViewController only.
In your situation, I use UITableViewController with static table to achieve that.
Hope this can help.

tabbed navigation in tableview section header

I'd like to mimic the behavior of profile page of pinterest app.
You can tab on Boards/Pins/Likes(tableview section header) and, tableview changes accordingly.
Below are screenshots to illustrate this.
Suppose I can create each of the tabs(boards/pins/likes) in separate viewController.
Also suppose I want to reuse the code of each viewController because other views(such as 'following' tab on the tab bar) look very much like one of them(boards/pins/likes).
How would I share a table header & table section header and also separate codes enough so that I can reuse bulk of them?
Basically, I have two viewControllers with tableview.
Now I want to create a new viewController with a tableView header/section header that user will tab to see one of the previous two viewController's view.
I don't think the tab appear in Table Header, instead it might be a view subclassing UISegmentedControl. If you want to reuse it you can create the interface in xib file and link it with your view controller
try check this github project https://github.com/rs/SDSegmentedControl for custom UISegmentedControl

Puzzle tableview with tableviewcell...?

I have a small query.I have made an application in which i am fetching information from the webservice and i am displaying it on the table view.The table view which i a using is customized one in which i have used the text and the image property.
These things are working fine but now i have added a button ,once i click on it then a new view appears which has 2 options for 2 countries whose webservices are provided to me ,once i click on one button and see the table view then the list of the previous table view only appears and if i scroll through the whole list then the values changes which is according to the webservice.
So kindly suggest me as in what should be the approach of directly showing the updated tablecells.
[tableView reloadData];
call it explicitly from the secon view, or you can put it in viewWillAppear

How can I put an editable table view in a tab bar application?

I am starting out with the tab bar application in XCode and I want to put a table view in one of the tabs. I know how to physically put the table view into a tab with interface builder, but I need to be able to edit the data in the table, so I'm not just left with blank cells.
So, how can I edit the data in the table?
Essentially, I want to put a navigation-based application inside the tab of a tab bar application.
Thanks for the help!
UITableViewCells don't, by themselves, support the ability for the user to edit their content. You can set up your UI to allow users to do so, but it'll take a little extra effort.
If what you're really looking for is for the user to be able to enter text into a table cell, I would add an Edit button to your text cells, so that the user can tap it to go into edit mode for a cell.
When a cell goes into edit mode, add a UITextField to the cell view and call its -makeFirstResponder method to bring up the keyboard.
When the user taps the Done button on the keyboard, call -resignFirstResponder on the text field to dismiss the keyboard, then update your table view's data source object (this is the object you've assigned to the UITableView's dataSource property) with the string from the text field's text property and remove the UITextField from your table cell and reload the table's data by calling its reloadData method. Or if you are keeping a reference to the edited table cell somewhere, you could just update the cell object directly instead of calling reloadData on the table.
You can't just add text to table cells in InterfaceBuilder. You'll need to hook your UITableView to a UITableViewDataSource, and have that data source provide the cells you want your table to display.
Here's a great starting point: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/TableViewAPIOverview/TableViewAPIOverview.html%23//apple_ref/doc/uid/TP40007451-CH4-SW2
Give this a shot http://www.amasso.info/?p=77

How do i add button style cells to table views in iPhone apps?

I'm not able to find any specific examples in apple's documentation on this. I want to add two to three buttons to a table view programmatically, much like the contacts app does with the send text message/ add to favorites buttons on a contacts's info. does anyone know how to configure this?
What I've done in my apps is create a view with the buttons on it and return that view in the tableView:viewForHeaderInSection: and/or tableView:viewForFooterInSection: methods of the UITableView delegate.