change tableview to view in iphone - iphone

i'm having a tableview nib file.(contains a list)
i want to add some buttons with it
so i want to change the tableview to view and put the tableview inside that view
then add buttons to the view..
what to change in the class files and how to do this?

if you want to change the tableview to view, you can do in the IBOutlet.
By changing the value in the Inspector Identity from UITableView to view. So that it will change to view and you can add buttons and some to that view.
or else you can add the buttons with out changing the IBOutlet with code.
you can change the UITableView frame and you can add buttons to the view.
Regards,
Satya

Related

Adding a UIActivityIndicatorView to a UITableViewController

How is a UIActivityIndicatorView added to a UITableViewController?
I have tried adding it in Interface Builder and when I drag and drop it onto the view, it just disappears.
I need to show the activityIndicator while the table loads in its data.
If you put a tableview (not a tableview controller) inside another view you can place the activity indicator on top of it. To clarify:
- Plain xib file with a Files Owner and a First Responder
- Add a View (not a view controller)
- Add a TableView into the View
- Add an Activity Indicator into the View
For some reason, the various view controller objects don't like you adding things to them and the tableview object doesn't like you adding things to it. I'm sure that the docs make this really clear somewhere.
You can add UIActivityIndicatorView to your tables in the Interface Builder (IB), but a recommended way would be:
User IB to create and customize a UITableViewCell. Put a UIActivityIndicatorView inside this cell.
Programmatically load your table cells with the customized UITableViewCell nib file.
Programmatically hook up IBOutlets of such UIActivityIndicatorView.

in the iPhone App Store app, what's the control at the top of the featured view?

Is it a Segmented Control?
About the featured view, is it purely a tableview? how could they make the Segmented Control to be permanent instead of scrolling with the table cells down below?
as Ertebolle says its a UISegmentedControl set as the titleView of the navigationItem.
You can also create elements within the view that don't scroll with the tableview by adding a UITableView as a subview of a UIViewController's view. Setting its frame property means that you can have a scrollable tableview in a fixed certain position in your view and other elements in the view that don't scroll with it.
Yes, I believe it is a UISegmentedControl. But it's set as the title view of the navigation bar - to reproduce the whole effect, you'd create a UINavigationController, push a UITableViewController as the top view in it, and set the titleView of the table view controller's navigationItem to that segmented control. This would automatically anchor the toolbar / segmented control on top.

Possible to have a small UITable in a View?

Is it possible to have a small UITable in a view, where when you click a cell, the small table is transitioned to the detail level? I currently have it so that the whole screen slides to the detail level.
thanks
Instead of creating a UITableView/UITableViewController, create a UIView/UIViewController and drag-drop the UITableView to your UIView. Set the size and position of the tableview as you want and make the UIViewController the tableview's delegate and datasource.
What you have to do is create another view controller and lay it over the top.
to make a UITableView co-exist with a UINavigationController you have to create a transparent view to hold it. the view will be fullscreen so it does not resize the embedded UITable

How to add a view above my NavigationControllers TableView

I have created a reusable class that fades in a "loading message" and indicator at the foot of the devices screen.
The problem I have is that when I'm adding the loadingview to a view that is contained in a NavigationController I want the view to stay at the bottom of the screen, even when scrolling the tableview.
How can i add a view ABOVE the TableView that is not affected by scrolling and such?
Add it to the view containing the UITableView so that it is a peer to the UITableView rather than a child of it. Generally, this is the UIWindow that your application delegate owns.

Toolbar with UITableView

How could i get a toolbar with tableview to get buttons on that?
I solved this in my apps by adding a toolbar to a UIView and then add the table view to the UIView, too. This fixes the toolbar on top and allows the table to scroll. UITableView itself does not allow adding subviews.
See also here: UISplitViewController: how to get toolbar if details controller is UITableView?