我无法在 iphone 模拟器中测试此代码,但我想知道这是否是为某人在 UIImagepickercontroller 类中拍摄的照片添加标题的最佳方式。
- (void)imagePickerController:(UIImagePickerController *) Picker
didFinishPickingMediaWithInfo:(NSDictionary *)info {
_selectedImage.image = [info objectForKey:UIImagePickerControllerOriginalImage];
UITextField *caption= [[UITextField alloc] initWithFrame:CGRectMake( 60,640,200,40)];
caption.borderStyle = UITextBorderStyleRoundedRect;
caption.font = [UIFont systemFontOfSize:15];
caption.placeholder = @"Type Caption";
[caption release];
}