Вопрос

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];
 }
Это было полезно?

Решение

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.
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top