How To Replicate This User Interface Design? - iphone

I want to create a UI like the on in Mint.com app. Is it a UIScrollView with UITableView cells in it?
Notice how each block/cell has multiple data values in it.

This is all about customising the table view and table view cells. The best tutorial I've found is Cocoa with Love: Easy custom UITableView drawing. It's a good place to start.

This is a UITableView with UITableViewStyleGrouped and multiple sections. The spacing between sections appears to be increased from the default value.
The cell backgrounds have a slight gradient added to give them depth. Each section appears to have a different custom layout of labels, and, in the one case, a custom slider-like object. The object on the right is a standard UITableViewCellAccessoryDetailDisclosureButton.
You can achieve similar effects by subclassing UITableViewCell.

Related

iOS Making a custom table view with spaced out and custom cells

I am attempting to make a custom view that looks like the attached picture. The top two cell would be static while the bottom three would scroll if there are more than the screen can fit, and only scroll within that given area. I am wondering what the best approach is to making these types of custom views. I know how to make custom UItableviewcells and have custom content in them, but I am struggling with an overall strategy to make a custom UITableview that has certain cells be static and others scroll. Should I just implement a table view to be part of the screen in storyboards? Or are there better ways to do so?
I would do this by making the top two "cells" just be UILabels, and the bottom a table view where both the cells and the table view would have a clear background. The table view should be set to have no separators between the cells, and the cells should have a UILabel with a background cooler the same as the top UILabels.
This was the result:
I normally do not like to use story board much. And prefer SubClassing UIView. It might take more time to code at first but in a long run it is easier and very dynamic to control the UI programmatically.
In your problem I would make two static UIView(s). If the two view are similar the advantage of using UIView class is that you can use same class with different data model to generate multiple views. But if you use story board you need to copy past multiple times. Hence try to create UIViews class objects as much as possible.
And then the bottom one will be a simple table view. Do not think there is much you can do in this case. Do submit some codes you have done so that we can better refine it.

creating custom UITableView in iPhone

Can we create UITableView with UITableView cell in horizontal as well as vertically aligned
Please advise.
Well, its possible to modify the UITableView and add cell rows that contain multiple views set to be in horizontal order, but that would require a lot of custom work, too much in my opinion, you will lose the benefit of using a UITableView,
What i suggest here is to create your custom view, that has it custom DataSource and Delegate, and create your own view drawing logic, since this is a fairly complex view, it will require more work to customize your table view, than creating a ne UIView subclass

How can I make my custom UITableViewCells as fast as possible?

I'm creating custom UITableViewCells, and I'd like to make them in a way that allows the table view's scrolling to be as smooth as possible. In their current state, with a custom background image on each cell using the cell's backgroundView property, scrolling is is still fairly smooth.
But my question is, how can I add content to the cell and maintain this? The cells are fairly different from each other -- one may have a single label, another may have two labels and an icon, and another may have a bunch of other controls.
I've found that using unique cell identifiers for non-similar rows makes the overall experience laggy, so I need a method that allows me to use the same cell identifier and have very different cells.
Should I be using an XIB for this? If not, how should my subclass function? I was thinking of adding all of the controls to the cell, and only hiding/using the ones necessary at the time. Is there a cleaner way?

iPhone app - some custom UITableViewCell questions

At the moment, I have a settings view in my iPhone app built with Interface builder, it consists of a background image, some text fields, labels and buttons. Because this looks bad, I want to convert the settings view to an UITableView with custom UITableViewCells.
I already tried adding some cells into my settings view's XIB and returning them in the cellForRowAtIndexPath method (with [return myCell];), as written in Apple's tutorial, but this was not working for me - my whole TableView looked strange and it only showed the first cell correctly.
Is it possible to design these custom cells in Interface Builder? Do I have to create an empty XIB for them or can I put them in my view's XIB? And how do I insert them into my TableView?
Thanks in advance,
Yassin
You can absolutely add custom table cells that you built in interface builder. This includes both static cells and Dynamic cells. However without you providing more information the best I can say is "double check the docs and try again." I can only say that it works and it's rather straightforward so it's hard to say what you may have missed. It might be more helpful if you post what you have for the tableView:cellForRowAtIndexPath method.
Since you say you just have some text fields, I would recommend looking at the technique for static row content section of the Table View Programming guide. You probably would want to have each field of your form correspond to a row in a Segmented Table View, it'll make everything look nicer.

Multiple images per row in UITableView's cell

Is there any sample code that would illustrate how to have multiple images within each row?
Typical apps show a thumbnail to the left side with text to the right. I'd like to do that plus an image to the right of the text.
How would I go about doing this?
In interface builder, simply create a tableview cell that looks like you want. Then create a UITableViewCell subclass that has properties pointing to the elements of the new cell. Set the class of cell to the subclass then add cells of that class to the table in the standard way.
A tableview cell is just a view and you modify it and use it just like any other view.
You'll have to create a custom UITableView cell. Here's an example of using multiple UILabels in one. Here's another.
Pretty easy - follow Apple's documentation to create exactly the cell you want in Interface Builder with as many UIImage or whatever else you like. Look at Table View Programming Guide for details on how to make and load the custom cells - just be careful about performance when you put a lot of visual elements in a table view.