문제

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