//自定义拍照界面
- (void)photograph {
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self; // 设置委托
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePickerController.allowsEditing = YES;
imagePickerController.showsCameraControls = NO;
UIButton *selectButton = [UIButton buttonWithType:UIButtonTypeCustom];
[selectButton setImage:[UIImage imageNamed:@"button.png"] forState:UIControlStateNormal];
[selectButton setTranslatesAutoresizingMaskIntoConstraints:NO];
[selectButton addTarget:self action:@selector(selectButtonPressed:) forControlEvents:UIControlEventTouchUpInside];