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

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

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

    <tfoot id='WBttG'></tfoot>

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

        <legend id='WBttG'><style id='WBttG'><dir id='WBttG'><q id='WBttG'></q></dir></style></legend>

        如何通過點(diǎn)擊動(dòng)畫 UIImageview 以顯示全屏?

        How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點(diǎn)擊動(dòng)畫 UIImageview 以顯示全屏?)
        <i id='btDLV'><tr id='btDLV'><dt id='btDLV'><q id='btDLV'><span id='btDLV'><b id='btDLV'><form id='btDLV'><ins id='btDLV'></ins><ul id='btDLV'></ul><sub id='btDLV'></sub></form><legend id='btDLV'></legend><bdo id='btDLV'><pre id='btDLV'><center id='btDLV'></center></pre></bdo></b><th id='btDLV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='btDLV'><tfoot id='btDLV'></tfoot><dl id='btDLV'><fieldset id='btDLV'></fieldset></dl></div>

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

              <tbody id='btDLV'></tbody>
          • <small id='btDLV'></small><noframes id='btDLV'>

                • <bdo id='btDLV'></bdo><ul id='btDLV'></ul>
                  本文介紹了如何通過點(diǎn)擊動(dòng)畫 UIImageview 以顯示全屏?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

                  我在 UITableviewCell 中有一個(gè) UIImageView.當(dāng)它被點(diǎn)擊時(shí), UIImageView 應(yīng)該動(dòng)畫以全屏顯示.當(dāng)圖像在全屏?xí)r被點(diǎn)擊時(shí),它應(yīng)該收縮回原來的位置.

                  I have an UIImageView in a UITableviewCell. When it is tapped, the UIImageView should animated to be displayed fullscreen. When the image is tapped when it is fullscreen it should shrink back to the original position.

                  如何做到這一點(diǎn)?

                  推薦答案

                  向視圖控制器添加手勢識(shí)別器.

                  Add a gesture recognizer to the view controller.

                  將手勢識(shí)別器添加到您的頭文件中

                  Add the gesture Recognizer to your header file

                  @interface viewController : UIViewController <UIGestureRecognizerDelegate>{
                      UITapGestureRecognizer *tap;
                      BOOL isFullScreen;
                      CGRect prevFrame;
                  }
                  

                  在你的 viewDidLoad 中添加這個(gè):

                  In your viewDidLoad add this:

                  isFullScreen = false;
                  tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imgToFullScreen)];
                  tap.delegate = self;
                  

                  添加以下委托方法:

                  - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch;
                  {
                      BOOL shouldReceiveTouch = YES;
                  
                      if (gestureRecognizer == tap) {
                          shouldReceiveTouch = (touch.view == yourImageView);
                      }
                      return shouldReceiveTouch;
                  }
                  

                  現(xiàn)在您只需要實(shí)現(xiàn)您的 imgToFullScreen 方法.確保使用 isFullScreen Bool(如果為 false,則為全屏,如果為 true,則返回舊尺寸)

                  Now you just need to implement your imgToFullScreen method. Make sure you work with the isFullScreen Bool (fullscreen if it is false and back to old size if it's true)

                  imgToFullScreen 方法取決于您希望如何使圖像變?yōu)槿?一種方法是:(這是未經(jīng)測試的,但應(yīng)該可以工作)

                  The imgToFullScreen method depends on how you want to make the image become fullscreen. One way would be: (this is untested but should work)

                  -(void)imgToFullScreen{
                      if (!isFullScreen) {
                          [UIView animateWithDuration:0.5 delay:0 options:0 animations:^{
                              //save previous frame
                              prevFrame = yourImageView.frame;
                              [yourImageView setFrame:[[UIScreen mainScreen] bounds]];
                          }completion:^(BOOL finished){
                              isFullScreen = true;
                          }];
                          return;
                      } else {
                          [UIView animateWithDuration:0.5 delay:0 options:0 animations:^{
                              [yourImageView setFrame:prevFrame];
                          }completion:^(BOOL finished){
                              isFullScreen = false;
                          }];
                          return;
                      }
                  }
                  

                  這篇關(guān)于如何通過點(diǎn)擊動(dòng)畫 UIImageview 以顯示全屏?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  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 屬性))
                  drawRect circle and animate size/color(drawRect 圓和動(dòng)畫大小/顏色)
                    <bdo id='IYRyt'></bdo><ul id='IYRyt'></ul>
                  • <small id='IYRyt'></small><noframes id='IYRyt'>

                  • <legend id='IYRyt'><style id='IYRyt'><dir id='IYRyt'><q id='IYRyt'></q></dir></style></legend>

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

                    1. <tfoot id='IYRyt'></tfoot>

                            <tbody id='IYRyt'></tbody>

                            主站蜘蛛池模板: 成人精品一区二区三区 | 日韩欧美在线播放 | 欧美八区 | av天空| 欧美黑人体内she精在线观看 | 亚洲啪啪一区 | 国产精品九九九 | 欧美国产日韩一区二区三区 | 91青青草视频 | 一区二区不卡高清 | 中文字幕成人av | 日本三级网站在线观看 | 欧美一级片黄色 | 亚洲国产精品99久久久久久久久 | 亚洲免费视频一区 | 成人福利在线观看 | 免费视频中文字幕 | 欧美一区二区在线免费观看 | 不卡的av在线 | 欧美中文视频 | 91新视频 | 国产精品久久久爽爽爽麻豆色哟哟 | 中文字幕在线三区 | 91视频麻豆 | 色综合九九 | 亚洲国产一区在线 | 91短视频网址 | 欧美久久久久久 | 日韩av一区二区在线观看 | 天天操天天天干 | 国内自拍视频在线观看 | 中文字幕亚洲精品 | 久久国产精品视频 | 精品一区二区三区四区视频 | 亚洲精品av在线 | 久久亚洲一区二区三 | 午夜视频一区二区 | 国产精品高潮呻吟久久 | www.日本在线播放 | 九九九久久国产免费 | 中文字幕电影在线观看 |