Graphics Programs Reference
In-Depth Information
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:ip];
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
NSArray *allAssets = [[BNRItemStore sharedStore] allAssetTypes];
NSManagedObject *assetType = [allAssets objectAtIndex:[ip row]];
[item setAssetType:assetType];
[[self navigationController] popViewControllerAnimated:YES];
}
@end
In
DetailViewController.xib
, add a new
UIButton
to the view. Create and
connect the outlet and action as shown in
Figure 16.13
. The outlet
assetTypeButton
should be a weak instance variable. (Remember, you create and connect outlets by
Control-dragging to
DetailViewController.h
.)
Figure 16.13 Add a UIButton