<legend id='106cq'><style id='106cq'><dir id='106cq'><q id='106cq'></q></dir></style></legend><tfoot id='106cq'></tfoot>

    • <bdo id='106cq'></bdo><ul id='106cq'></ul>
  • <i id='106cq'><tr id='106cq'><dt id='106cq'><q id='106cq'><span id='106cq'><b id='106cq'><form id='106cq'><ins id='106cq'></ins><ul id='106cq'></ul><sub id='106cq'></sub></form><legend id='106cq'></legend><bdo id='106cq'><pre id='106cq'><center id='106cq'></center></pre></bdo></b><th id='106cq'></th></span></q></dt></tr></i><div id='106cq'><tfoot id='106cq'></tfoot><dl id='106cq'><fieldset id='106cq'></fieldset></dl></div>

    <small id='106cq'></small><noframes id='106cq'>

      1. '支持的方向与应用程序没有共同的方向,并且

        时间:2023-05-30
      2. <small id='qA8Rl'></small><noframes id='qA8Rl'>

          <tfoot id='qA8Rl'></tfoot>

              <i id='qA8Rl'><tr id='qA8Rl'><dt id='qA8Rl'><q id='qA8Rl'><span id='qA8Rl'><b id='qA8Rl'><form id='qA8Rl'><ins id='qA8Rl'></ins><ul id='qA8Rl'></ul><sub id='qA8Rl'></sub></form><legend id='qA8Rl'></legend><bdo id='qA8Rl'><pre id='qA8Rl'><center id='qA8Rl'></center></pre></bdo></b><th id='qA8Rl'></th></span></q></dt></tr></i><div id='qA8Rl'><tfoot id='qA8Rl'></tfoot><dl id='qA8Rl'><fieldset id='qA8Rl'></fieldset></dl></div>
                <bdo id='qA8Rl'></bdo><ul id='qA8Rl'></ul>
                  <tbody id='qA8Rl'></tbody>
                1. <legend id='qA8Rl'><style id='qA8Rl'><dir id='qA8Rl'><q id='qA8Rl'></q></dir></style></legend>
                  本文介绍了'支持的方向与应用程序没有共同的方向,并且 shouldAutorotate 返回 YES'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

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

                  *My view is in land scape mode i am saving image and i want that image back for that i my code is below and i am geting error "Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'" * what can i do for 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];
                                }`
                  

                  推荐答案

                  尝试将 shouldAutoRotate 设置为 NO 看看是否有效.

                  try setting shouldAutoRotate to NO and see if it works.

                  您可以在 iOS 6.0 或更高版本中使用 shouldAutoRotate 和 supportedInterfaceOrientations 方法,而不是(不推荐使用的) shouldAutoRotateToInterfaceOrientation 方法.

                  You can use shouldAutoRotate and supportedInterfaceOrientations methods in iOS 6.0 or later, instead of the (deprecated) shouldAutoRotateToInterfaceOrientation method.

                  类似的东西-

                  - (NSUInteger)supportedInterfaceOrientations {
                      return UIInterfaceOrientationMaskAll;
                  }
                  
                  
                  - (BOOL) shouldAutorotate {
                      return YES;
                  }
                  
                  
                  - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
                      return UIInterfaceOrientationPortrait;
                  }
                  

                  这篇关于'支持的方向与应用程序没有共同的方向,并且 shouldAutorotate 返回 YES'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:模态视图控制器不会自行关闭 下一篇:将地址地理编码为iphone中的坐标

                  相关文章

                  最新文章

                  1. <i id='RPJf3'><tr id='RPJf3'><dt id='RPJf3'><q id='RPJf3'><span id='RPJf3'><b id='RPJf3'><form id='RPJf3'><ins id='RPJf3'></ins><ul id='RPJf3'></ul><sub id='RPJf3'></sub></form><legend id='RPJf3'></legend><bdo id='RPJf3'><pre id='RPJf3'><center id='RPJf3'></center></pre></bdo></b><th id='RPJf3'></th></span></q></dt></tr></i><div id='RPJf3'><tfoot id='RPJf3'></tfoot><dl id='RPJf3'><fieldset id='RPJf3'></fieldset></dl></div>
                      • <bdo id='RPJf3'></bdo><ul id='RPJf3'></ul>

                    1. <small id='RPJf3'></small><noframes id='RPJf3'>

                      <legend id='RPJf3'><style id='RPJf3'><dir id='RPJf3'><q id='RPJf3'></q></dir></style></legend>
                      <tfoot id='RPJf3'></tfoot>