18

I want to create a view similar to the iPhone's Settings app.

Is this view using a UITableView or what? Are the items created programmatically or is it possible to do this in Interface Builder?

TheLearner
  • 19,387
  • 35
  • 95
  • 163

4 Answers4

22

It is a UITableView with style: UITableViewStyleGrouped

It is possible to do so in Interface builder and there are a number of ways.

This article describes the most intuitive way a Google search has to offer: http://www.galloway.me.uk/tutorials/custom-uitableviewcell/

Key steps are:

  • Create UIViewController with xib (not table view controller)
  • replace it's initial view with a UITableView
  • implement UITableViewDelegate and UITableViewDatasource protocols
  • add any additional UITableViewCells to Interface Builder as extra views
  • refer to them in your view controller class as IBOutlet UITableViewCell *
  • use connections inspector to connect IBOutlets in view controller to cells in Interface Builder
mattjgalloway
  • 34,792
  • 12
  • 100
  • 110
Rich
  • 3,781
  • 5
  • 34
  • 56
6

Have a look at InAppSettingsKit Project which does not only to do settings in your app but it also provides the ability to have the settings externalized into the iPhone's settings app. This is probably the easiest way to get settings into your app.

Andy S.
  • 533
  • 2
  • 6
3

What you see in the Settigs App is different sections of a UITableView with "grouped" style, using a navigation controller. Have a look at the UICatalog example, as well as the Table View Programming Guide for iOS.

phi
  • 10,634
  • 6
  • 53
  • 88
1

Try FormKit. It will let you create Settings app like forms very easily.

Settings App like form

Jay Q.
  • 4,979
  • 3
  • 33
  • 36
  • For people trying to install formkit, get the formkit directory then install 'BWLongTextViewController', '~> 1.0' 'ActionSheetPicker2', '~> 0.1' 'BWSelectViewController' 'ActionSheetPicker-3.0', '~> 1.3.10' – Ted Feb 02 '15 at 11:21