久久久久久久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>

        如何通過點擊動畫 UIImageview 以顯示全屏?

        How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 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>
                  本文介紹了如何通過點擊動畫 UIImageview 以顯示全屏?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我在 UITableviewCell 中有一個 UIImageView.當它被點擊時, UIImageView 應(yīng)該動畫以全屏顯示.當圖像在全屏時被點擊時,它應(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.

                  如何做到這一點?

                  推薦答案

                  向視圖控制器添加手勢識別器.

                  Add a gesture recognizer to the view controller.

                  將手勢識別器添加到您的頭文件中

                  Add the gesture Recognizer to your header file

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

                  在你的 viewDidLoad 中添加這個:

                  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)在您只需要實現(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)于如何通過點擊動畫 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 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經(jīng)包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))
                  drawRect circle and animate size/color(drawRect 圓和動畫大小/顏色)
                    <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免费 | 国产91av视频 | 99热| 亚洲免费看片 | 欧美一区二区三区在线播放 | 日韩精品免费看 | 亚洲国产精品久久 | 日韩一级欧美一级 | 精品粉嫩小bbwbbwbbw | 国产成人在线观看免费网站 | 欧美一区二区三区视频 | 黄色a一级片 | 国产成人在线免费观看 | 亚洲欧美日本在线 | 欧美一区在线视频 | 国产美女91呻吟求 | 日韩资源在线 | 亚欧洲精品在线视频免费观看 | 三级中文字幕 | 黄色三级av | 精品一区二区三区中文字幕 | www.国产.com | 国产成人+综合亚洲+天堂 | 能看的av| 欧美成人猛片aaaaaaa | 国产午夜精品视频 | 免费a在线 | 97超碰资源站 | 欧美日韩国产在线观看 | 亚洲精品午夜精品 | 在线观看网址你懂的 | 一区二区免费视频 | av在线播放观看 | 国产精品美女久久 | 成人免费网站黄 | 国产成人午夜 | 国产伦精品一区二区免费 | 久久久久亚洲精品 | 成人免费在线播放 | 欧美黄色一级大片 | 蜜桃综合网 |