开发者

ipad:how to use uiimagepickercontroller move and scale image

开发者 https://www.devze.com 2023-02-12 06:15 出处:网络
in my xib there is a choose image from photolibrary button, below is the touch up inside event if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {

in my xib there is a choose image from photolibrary button, below is the touch up inside event

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
    UIImagePickerController *picker = [[UIImagePickerController alloc]init];

    picker.delegate = self;
    picker.allowsImageEditing = YES;
    picker.allowsEditing = YES;
    picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

    UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:picker];
    [popover presentPopoverFromRect:CGRectMake(0, 0开发者_如何学JAVA, 300, 300) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
    self.popoverController = popover;

    [popover release];
    [picker release];
}

but when i choose one image from photo albums i cant move or scale the image, it means when i move the image, it always move back to center automatically.

can anyone give me some help? thanks a lot


It sounds like you want functionality in the UIScrollView range. I would download the WWDC 10 video based on UIScrollViews to see how a zooming image is implemented well.

Good luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消