I'm trying to make a table view have cells that look iOS' native call log. I've got it close just using the storyboard layout editor (Style: Subtitle, Accessory: Detail Disclosure) but I'm not sure how to get that timestamp in there on the right. Is that something I can also layout using the storyboard, or is that something that I'll need to layout programmatically (e.g. subview)?
I think I basically need to combine UITableViewCellStyleValue1 and UITableViewCellStyleSubtitle.
Related
I'm developing an iOS application, and I would like to use a similar layout used in iOS settings, but I'm not sure if there is any predefined components to use, or if there's some predefined layout which does exactly what I want to achieve. It looks like this:
(source: iphonehacks.com)
I'm looking for the 'Behavior' header, the white elements like 'Animate Icon'. Do I have to create them from scratch using labels, textfields and so on, or are there any predefined components available?
Many thanks!
Appears to be a UITableView using the grouped style, and the string 'Behavior' was returned from the tableView:titleForHeaderInSection: datasource method, which is defined in the UITableViewDataSource protocol.
You can select the grouped style in storyboard by selecting the table view and changing the style with the Attributes inspector.
In iOS, the built-in contacts app looks similar to what's displayed on this example page. What controls are being used to create the initial view? Is it a table view? If so, how is the image on the left offset from the two rows?
What's happening behind the scenes to switch this view into edit mode? Are labels being replaced with textboxes or are the textboxes simply being set to editable?
There are 2 ways to do things like this that I know
#1. That is UI TableView, but TableView with a custom TableView Header.
Also it is UITableViewStyleGrouped
Just Init and setup the view include a UIImageView On the left side and three UITextField on the right side.
like this
|----------| |---TextField---|
|---Image--| |---TextField---|
|----------| |---TextField---|
and set this view with:
self.tableview.headerView = yourViewWithImageAndTextField;
2. Just try to use Apple's own ABPersonViewController
Apple's sample
Documentation
Good luck to you
This looks like an pre iOS7 UITableView in UITableViewStyleGrouped style, and a probably a custom cell to handle the image.
I have a TableView in which a most cells are pretty standard. I make them buy using static cells in Storyboard. However, one cell I would like to customize probably using an XIB file so I would need to load it programmatically.
In the TableView's data source, is it possible to handle loading XIB view for this particular cell only, while leaving other cells to what's delineated in the static cells in the Storyboard? Or is it an all or nothing thing where I need to just give up using static cells altogether?
The rationality for doing this is that I would like to make Storyboard to look as close to the real thing as possible. Right now if I provide a data source, the static cells in the storyboard would have no effect on the actual output and is not in any sense linked to the actual output.
Yes, it is possible. Set the custom class for the custom cell. If you wish to customise it from code, just connect it as an IBOutlet to the UITableViewController.
I would like to know how to develop an IOS Table View Controller with multiple sections.
For example attached is a screenshot from DrawSomething account page. They have different headings like account settings, password, then some buttons below.
Would this be setup as one UITableViewController then setup image backgrounds for the headers and customized cells for each table cell, or would this be setup using multiple different view controllers all within one main view controller?
Further to this, could this be setup and designed using a NIB or would it be alot easier using code to generate this. I understand that it the choice of the developer and your opinion but in common practice if it is possible to design (as such) within the NIB it would be easier. Although designing a table view layout in NIB does not appear to be possible...
For something like this, since there's nothing really dynamic about the content, I would use a UIScrollView and just place the various elements on it directly.
Looks to me like each "section" of that table is actually a custom cell. The "heading" of the cell is just a label with textFields place in it etc...
Get a UIImageView to back the cells and you're good to go.
I've done stuff very similar to this using Interface Builder.
Make each cell use a different reuse Identifier so that when you load the table you know which cell is which.
You can create a table view with multiple sections. You need to create custom cells for headings and the contents.
I cannot use static style UITableViewCells because of the storyboard restriction that the underlying controller must be a UITableViewController.
So how can I achieve the UI layout like the 'new contact' screen in the ios Contacts app?
In particular the phone numbers/email ('mobile', home) input: is there any existing API that draws the thin vertical divider? Or I have to create a nib?
I've seen this done by having the top three fields be fake. Use a table view header which has the image view and the First/Last/Company be simple textfields. You put a pretty picture that looks like table cells behind First/Last/Company.