久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

  • <tfoot id='JEaae'></tfoot>
    <legend id='JEaae'><style id='JEaae'><dir id='JEaae'><q id='JEaae'></q></dir></style></legend>

    <small id='JEaae'></small><noframes id='JEaae'>

        • <bdo id='JEaae'></bdo><ul id='JEaae'></ul>

        performSegueWithIdentifier 不起作用

        performSegueWithIdentifier not working(performSegueWithIdentifier 不起作用)

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

          2. <i id='pts2N'><tr id='pts2N'><dt id='pts2N'><q id='pts2N'><span id='pts2N'><b id='pts2N'><form id='pts2N'><ins id='pts2N'></ins><ul id='pts2N'></ul><sub id='pts2N'></sub></form><legend id='pts2N'></legend><bdo id='pts2N'><pre id='pts2N'><center id='pts2N'></center></pre></bdo></b><th id='pts2N'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pts2N'><tfoot id='pts2N'></tfoot><dl id='pts2N'><fieldset id='pts2N'></fieldset></dl></div>
            <legend id='pts2N'><style id='pts2N'><dir id='pts2N'><q id='pts2N'></q></dir></style></legend>
              <bdo id='pts2N'></bdo><ul id='pts2N'></ul>

            • <tfoot id='pts2N'></tfoot>

                    <tbody id='pts2N'></tbody>
                • 本文介紹了performSegueWithIdentifier 不起作用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有這段代碼在按下按鈕時加載一個新的 UIView(來自情節提要).goPressed 函數在按下按鈕時觸發,它調用 selectImage 函數.selectImage 打開一個 UIImagePickerController 并讓用戶選擇一張照片.用戶選擇照片后,didFinishPickingMediaWithInfo 委托將選擇的圖像添加到 UIImageView.

                  I have this code that loads a new UIView (from storyboard) when a button is pressed. goPressed function is fired on button pressed and it calls selectImage function. selectImage opens a UIImagePickerController and lets user select a photo. After user has selected the photo, didFinishPickingMediaWithInfo delegate adds the selected image to a UIImageView.

                  在 'goPressed' 中,執行 selectImage 后,它應該在注釋為//1 處執行 Segue.但什么也沒有發生.performSegueWithIdentifier 似乎不起作用.如果我在調用 performSegueWithIdentifier 之前不調用 [self selectImage],它會起作用.代碼如下:

                  In 'goPressed', after selectImage is performed, it should be performing a Segue at like commented as //1. But nothing happens. performSegueWithIdentifier doesn't seem to be working. And if I don't call [self selectImage] before calling performSegueWithIdentifier, it works. Here is the code:

                  - (IBAction)goPressed:(id)sender {
                      [self selectImage];
                      [self performSegueWithIdentifier:@"lastView" sender:currentSender]; //1
                  }
                  -(void)selectImage
                  {
                      // Create image picker controller
                      UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
                  
                      // Set source to the camera
                      imagePicker.sourceType =  UIImagePickerControllerSourceTypePhotoLibrary;
                  
                      // Delegate is self
                      imagePicker.delegate = (id)self;
                  
                      // Allow editing of image ?
                      imagePicker.allowsEditing=NO;
                  
                  
                      // Show image picker
                      [self presentModalViewController:imagePicker animated:YES];
                  
                  
                  }
                  
                  - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
                  {
                      // Access the uncropped image from info dictionary
                      UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
                  
                      [[picker presentingViewController] dismissModalViewControllerAnimated:YES];
                  
                  
                      lePreview.image= image;
                  
                  
                  }
                  

                  請幫忙,為什么 performSegueWithIdentifier 不起作用?我希望我沒有遺漏您需要的任何信息.

                  Please help, why performSegueWithIdentifier isn't working? I hope I am not missing any information you need.

                  推薦答案

                  我假設您嘗試轉場的視圖是使用您在轉場之前獲得的圖片?如果他們從圖像選擇器中取消,你還想繼續嗎?

                  I'm assuming that the view you are trying to segue to is using the picture you get just before you do your segue? If they cancel from the image picker do you still want to segue?

                  如果它需要圖片,那么也許你應該在代表調用確實完成挑選"之后調用你的 segue.

                  If it needs the picture, then maybe you should call your segue after the delegate call "did finish picking".

                  segue 沒有觸發的問題可能是由于動畫仍然從這里發生:

                  The issue with the segue not firing may be due to the animation still occurring from here:

                  [[picker presentingViewController] dismissModalViewControllerAnimated:YES];
                  

                  你可以試試:

                  [[picker presentingViewController] dismissModalViewControllerAnimated:NO];
                  

                  或者如果你想保持動畫,將segue移動到picker did finish"方法并這樣做:

                  or if you want to maintain the animation, move the segue to the "picker did finish" method and do it this way:

                  [self dismissModalViewControllerAnimated:YES completion:^() {
                  [self performSegueWithIdentifier:@"lastView" sender:self];
                  }];
                  

                  或者如果這不起作用,請在 pickerdidfinish 方法中嘗試這種方法(注意 - 這應該作為調用模態視圖的控制器中的委托來實現,而不是模態視圖本身:

                  or if that does not work try this approach in the pickerdidfinish method (note - this should be implemented as a delegate in the controller that calls the modal view, not the modal view itself:

                  //maintain the animation
                  [self dismissModalViewControllerAnimated:YES];
                  
                  //slight pause to let the modal page dismiss and then start the segue
                  double delayInSeconds = 0.5;
                  dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
                  dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
                  
                      //code to be executed on the main queue after delay
                  
                      [self performSegueWithIdentifier:@"lastView" sender:self];
                  
                  });
                  

                  我經常使用這種過渡,它會在模態視圖中很好地下降,然后在 segue 視圖中滑動,暫停讓過渡看起來很自然.

                  I use this transition frequently and it makes a nice drop away with the modal view then slides in the segue view and the pause allows the transition to seem natural.

                  這篇關于performSegueWithIdentifier 不起作用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))
                  • <bdo id='epefu'></bdo><ul id='epefu'></ul>

                        <tbody id='epefu'></tbody>
                      <i id='epefu'><tr id='epefu'><dt id='epefu'><q id='epefu'><span id='epefu'><b id='epefu'><form id='epefu'><ins id='epefu'></ins><ul id='epefu'></ul><sub id='epefu'></sub></form><legend id='epefu'></legend><bdo id='epefu'><pre id='epefu'><center id='epefu'></center></pre></bdo></b><th id='epefu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='epefu'><tfoot id='epefu'></tfoot><dl id='epefu'><fieldset id='epefu'></fieldset></dl></div>

                    • <small id='epefu'></small><noframes id='epefu'>

                            <tfoot id='epefu'></tfoot>
                            <legend id='epefu'><style id='epefu'><dir id='epefu'><q id='epefu'></q></dir></style></legend>
                          1. 主站蜘蛛池模板: 亚洲一区精品在线 | 欧美视频一级 | 日韩免费中文字幕 | 亚洲电影第三页 | 国产福利91精品一区二区三区 | 青青草免费在线视频 | 国产一区二区在线播放视频 | 成年人网站在线观看视频 | 午夜视频一区二区 | 国产精品美女一区二区三区 | 特一级毛片| 在线免费观看一区二区 | 日本公妇乱淫xxxⅹ 国产在线不卡 | 久久久一区二区 | www.成人在线视频 | 久久精品国产v日韩v亚洲 | 2018天天干天天操 | 欧美亚洲一区二区三区 | 国产精品一区二 | 日韩成人免费视频 | 日本在线视频一区二区 | av电影一区二区 | 精品一区二区久久久久久久网站 | 久色视频在线观看 | 亚洲精品久久久久久久久久久 | 成人在线免费看 | 欧美综合自拍 | 欧美国产日本一区 | 久久草视频 | 日韩一区二区在线视频 | 久久专区| 超碰97在线免费 | 免费人成在线观看网站 | 视频一区二区在线观看 | 国产精品久久久久久久久久免费看 | 久久精品国产一区二区电影 | 日本天堂视频在线观看 | 日韩欧美在线观看 | 久久国产日本 | 激情av网站 | 理论片免费在线观看 |