久久久久久久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 不起作用的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我有這段代碼在按下按鈕時(shí)加載一個(gè)新的 UIView(來(lái)自情節(jié)提要).goPressed 函數(shù)在按下按鈕時(shí)觸發(fā),它調(diào)用 selectImage 函數(shù).selectImage 打開一個(gè) 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' 中,執(zhí)行 selectImage 后,它應(yīng)該在注釋為//1 處執(zhí)行 Segue.但什么也沒(méi)有發(fā)生.performSegueWithIdentifier 似乎不起作用.如果我在調(diào)用 performSegueWithIdentifier 之前不調(diào)用 [self selectImage],它會(huì)起作用.代碼如下:

                  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;
                  
                  
                  }
                  

                  請(qǐng)幫忙,為什么 performSegueWithIdentifier 不起作用?我希望我沒(méi)有遺漏您需要的任何信息.

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

                  推薦答案

                  我假設(shè)您嘗試轉(zhuǎn)場(chǎng)的視圖是使用您在轉(zhuǎn)場(chǎng)之前獲得的圖片?如果他們從圖像選擇器中取消,你還想繼續(xù)嗎?

                  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?

                  如果它需要圖片,那么也許你應(yīng)該在代表調(diào)用確實(shí)完成挑選"之后調(diào)用你的 segue.

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

                  segue 沒(méi)有觸發(fā)的問(wèn)題可能是由于動(dòng)畫仍然從這里發(fā)生:

                  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];
                  

                  或者如果你想保持動(dòng)畫,將segue移動(dòng)到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];
                  }];
                  

                  或者如果這不起作用,請(qǐng)?jiān)?pickerdidfinish 方法中嘗試這種方法(注意 - 這應(yīng)該作為調(diào)用模態(tài)視圖的控制器中的委托來(lái)實(shí)現(xiàn),而不是模態(tài)視圖本身:

                  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];
                  
                  });
                  

                  我經(jīng)常使用這種過(guò)渡,它會(huì)在模態(tài)視圖中很好地下降,然后在 segue 視圖中滑動(dòng),暫停讓過(guò)渡看起來(lái)很自然.

                  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.

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

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

                  相關(guān)文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過(guò)點(diǎn)擊動(dòng)畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報(bào))
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標(biāo)已經(jīng)包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進(jìn)度圖像(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. 主站蜘蛛池模板: 欧美日韩在线免费 | 国产激情在线观看视频 | 国产精品美女久久久久久不卡 | 日韩一级黄色片 | 精品91av| 国产精品资源在线 | 韩日一区二区三区 | 国产精品成人69xxx免费视频 | 日本一卡精品视频免费 | 91看片免费版 | 国产大学生情侣呻吟视频 | 亚洲高清一区二区三区 | 国产情侣在线看 | www.国产精品 | 日韩欧美三级 | 欧美精品一区二区三区在线播放 | 免费视频一区二区 | 国产一区免费视频 | 亚洲精品一二三 | 午夜天堂精品久久久久 | 99re6热在线精品视频播放 | 99福利 | 国产午夜一级 | 日日操av | 亚洲精品免费观看 | 91丨九色丨国产在线 | 日韩国产免费 | 亚洲精品福利视频 | 91精品国产一区二区在线观看 | 成人精品国产一区二区4080 | 成人在线h| 日韩精品中文字幕一区二区三区 | 日韩网站在线观看 | 成人影 | 在线免费观看黄色 | 天天操夜夜操 | 欧美性video 精品亚洲一区二区 | 人人人人干 | 久久久亚洲综合 | 久久国产高清 | 日韩欧美手机在线 |