Graphics Programs Reference
In-Depth Information
In
DetailViewController.h
, add an instance variable to hold the popover control-
ler. Also, declare that
DetailViewController
conforms to the
UIPopoverCon-
trollerDelegate
protocol.
@interface DetailViewController : UIViewController
<UINavigationControllerDelegate, UIImagePickerControllerDelegate,
UIPopoverControllerDelegate
>
{
__weak IBOutlet UITextField *nameField;
__weak IBOutlet UITextField *serialNumberField;
__weak IBOutlet UITextField *valueField;
__weak IBOutlet UILabel *dateLabel;
__weak IBOutlet UIImageView *imageView;
UIPopoverController *imagePickerPopover;
}
In
DetailViewController.m
, add the following code to the end of
takePic-
ture:
.