benhowdle89
benhowdle89

Reputation: 37464

Emulate a table cell without needing a UITableView (re-using standard iOS UI)

I'm creating a settings/edit profile view in my iOS app, which has a mix of text inputs, and cells which simply push a new View Controller onto the Nav Controller stack, ie.

enter image description here

However, to me that looks like a standard UITableViewCell with an image view on the left and an accessory view on the right. Could I leverage this control for my View, without needing to create a whole UITableView? Obviously I could re-create this with UIImageViews and UILabels but I was wondering if there was a better, more efficient way of creating this UI?

Upvotes: 0

Views: 1191

Answers (1)

mpramat
mpramat

Reputation: 201

I have often implemented such screens easily directly in my storyboards with static cells. Agreed, you need a tableview, but you get all the advantages (e.g. scrolling if the keyboard covers up any cells) practically for free without any additional code. You just write what you would write if you would recreate the interface with labels and image views and such.

Upvotes: 2

Related Questions