Wanting to create a static menu (IOS 5) and attempting to create custom cells within the storyboard to then load onto the grouped tableview.
I’ve created the outlet
@property(nonatomic,strong) IBOutlet UITableViewCell *labelCell;
The ViewController class is set to the proper TableViewController and I’ve connected the custom cell to this outlet.
I also have the delegate and datasource set up.
I’ve got
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
return self.labelCell;
}
I’m sure there is a ton wrong with this, but I’m just trying to display one cell and go from there. There does not seem to be any examples of doing custom cells within the IB through the storyboard. I can still use the old way of creating a xib file and loading it in the mainBundle but I just want to stay up to date I guess.
but with what I have above i get a crash when I load this view controller. SIGABRT
If you have set your
UITableViewto be using ‘Static Cells’ in the storyboard, you don’t need to implement any of theUITableViewDataSourcemethods and you can modify the cell directly in Interface Builder. For a single label cell, select the cell and change it’s type to ‘Basic’. You can now edit the cell just like you would any other view object.