gpt4 book ai didi

iphone - '支持的方向与应用程序没有共同的方向,shouldAutorotate 返回 YES'

转载 作者:太空狗 更新时间:2023-10-30 03:17:36 27 4
gpt4 key购买 nike

<分区>

*我的 View 处于横向模式我正在保存图像并且我想要那个图像回来我的代码在下面并且我收到错误“由于未捕获的异常'UIApplicationInvalidInterfaceOrientation'而终止应用程序,原因:'支持的方向与应用程序没有共同的方向,shouldAutorotate 返回 YES'"*我能为 iphone 做什么?

        `- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {

[self dismissModalViewControllerAnimated:YES];
[picker release];

}
- (void)imagePickerController:(UIImagePickerController *)picker

didFinishPickingMediaWithInfo:(NSDictionary *)info {

[picker dismissModalViewControllerAnimated:NO];

imageDoodle.image = [info objectForKey:@"UIImagePickerControllerMediaMetadata"];

}

-(IBAction)loadfromalbumclicked:(id)sender

{

UIImagePickerController * picker = [[UIImagePickerController alloc] init];

picker.delegate = self;

picker.allowsEditing=NO;

picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;

// self.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;

[self presentModalViewController:picker animated:YES];
}

-(IBAction)savePrint{
//Save image to iOS Photo Library

UIImageWriteToSavedPhotosAlbum(imageDoodle.image, nil, nil, nil);
//Create message to explain image is saved to Photos app library
UIAlertView *savedAlert = [[UIAlertView alloc] initWithTitle:@"Saved"

message:@"Your picture has been saved to the photo library, view it in the

Photos app." delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
//Display message alert
[savedAlert show];
}`

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com