//更换图片
-(IBAction) dishImageBtnAction:(id)sender
{
UIImagePickerController *imagePicker = [[UIImagePickerController alloc]init];//打开照片控制器
imagePicker.delegate = self;
//imagePicker.allowsEditing = YES;//图片可编辑
//需要添加委托
[self presentViewController:imagePicker animated:YES completion:^{}];
[imagePicker release];
}
//把选中的图片返回_dishImageBtn
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary*)editingInfo
{
//[self.navigationController popViewControllerAnimated:YES];
[_dishImageBtn setBackgroundImage:image forState:UIControlStateNormal];
[picker dismissViewControllerAnimated:YES completion:nil];
}