Domanda

I'm fairly new to iOS development and want to create a simple form using a grouped UITableView with UITabelCells to lay-out the form's contents. I want to do this interactively in XCode5.

My problem is, having added a UITableView to the xib, I can't edit its contents in XView. I had anticipated being able to drag UITableCells onto it. Is this possible in XVIew, or do I have to create the table's contents programatically?

È stato utile?

Soluzione

You cannot directly edit tableViewCells inside the TableView using xibs. It sounds like you want to use what are called prototype cells. These can only be created using storyboards. Here's a tutorial for prototype cells:

http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1

Altri suggerimenti

From iOS 5 and above Storyboard are being primarily used to design the app interface rather than xib.

With your view controller opened in storyboard you can define how the cells looks like for the tableview ( prototype or static content based)

Here is one example enter image description here

You can read more on it in the docs https://developer.apple.com/library/ios/documentation/userexperience/conceptual/tableview_iphone/TableViewCells/TableViewCells.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top