Domanda

I am trying to convert the code listed below to be able to be used with Storyboards. I am using Xcode 5.0.2 currently. If you can help it would be appreciated.

 {
      NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"Main" owner:self options:nil];
      cell = [nib objectAtIndex:0];
 }
È stato utile?

Soluzione

You don't need to do this anymore with storyboards. All you need to do is copy and paste the content of the cell nib into a new cell in a table view with dynamic prototypes.

  1. Drag a new Table View Cell into a Table View. Make sure to set your Table View to dynamic prototypes.
  2. Set the cell's identifier and load that the same as you would programmatically.
  3. Copy and paste the content from your nib into the new cell.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top