iphone照片裁剪

时间:2012-06-14 06:59:48

标签: iphone ios xcode uiimage uiimagepickercontroller

我正在实施photoalbum,我想从相册中选择图像,然后去编辑图像页面和裁剪图像像iphone一样制作矩形和显示矩阵一样在iphone 4s中我可以调整大小但我只看到一个大的长方形 我使用这段代码

if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
{
    UIImagePickerController *picker=[[UIImagePickerController alloc]init];
    picker.delegate=(id)self;
    picker.allowsEditing=YES;

    picker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
    [self presentModalViewController:picker animated:YES];

和这个代表

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {

}

1 个答案:

答案 0 :(得分:4)

检查example。希望它为你工作..