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

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

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

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

        在 iOS 5 中下拉 UIView

        Drag Down UIView in iOS 5(在 iOS 5 中下拉 UIView)

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

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

              1. <legend id='DifUT'><style id='DifUT'><dir id='DifUT'><q id='DifUT'></q></dir></style></legend>

                • <tfoot id='DifUT'></tfoot>
                • 本文介紹了在 iOS 5 中下拉 UIView的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我在我的 iPhone 應用中看到狀態欄上有一個手勢可以訪問通知中心.如何在我的應用程序中實現這種轉換?我認為這是通過滑動手勢識別器完成的,但是如何包含從上到下的滑動手勢(如何將通知中心拖動到其完整過渡)?是否有任何示例代碼或可以幫助我做到這一點的東西?提前謝謝

                  I saw in my iPhone app that there is a gesture on the status bar which can access Notification Center. How can I implement that kind of transition in my app?. I think this is done with the swipe gesture recognizer, but how do I include a swipe gesture from top to bottom (how you can drag the Notification Center through its full transition)? Is there any sample code or something that can help me do this? Thaks in advance

                  推薦答案

                  應該很容易做到.假設您有一個 UIView (mainView),您想從中觸發下拉操作.

                  Should be easy to do. Let's say you have a UIView (mainView) from which you want to trigger the pull down thing.

                  1. 在 mainView 可見區域的頂部外部放置一個子視圖(pulldownView).
                  2. mainView 上實現 touchesBegan 并檢查觸摸是否在前 30 個像素(或點)中.
                  3. 在你檢查的地方實現 touchesMoved,如果移動方向向下并且 pulldownView 不可見,如果是這樣,將 pulldownView 向下拖動到可見區域主視圖或檢查移動方向是否向上并且 pulldownView 可見,如果是,則向上推出可見區域.
                  4. 實現 touchesEnd,通過檢查 pulldownView 的移動方向來結束拖動或推動移動.
                  1. Put a subview (pulldownView) on mainView top-outside of visible area.
                  2. Implement touchesBegan on mainView and check if the touch is in the top 30 pixels (or points).
                  3. Implement touchesMoved where you check, if move direction is down and pulldownView not visible and if so drag the pulldownView down into visible area of main view or check if move direction is up and pulldownView visible and if so push upwards out of visible area.
                  4. Implement touchesEnd where you end the drag or push movement by checking in which direction the pulldownView was moved.

                  這里有一些示例代碼.未經測試,可能包含拼寫錯誤,可能無法編譯,但應該包含所需的基本部分.

                  Here's some sample code. Untested, may contain typos, maybe won't compile, but should contain the essential part needed.

                  //... inside mainView impl:
                  -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
                  {
                    UITouch *touch = (UITouch *)[touches anyObject];
                    start = [touch locationInView:self.superview].y;
                    if(start > 30 && pulldownView.center.y < 0)//touch was not in upper area of view AND pulldownView not visible
                    {
                      start = -1; //start is a CGFloat member of this view
                    }
                  }
                  
                  -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
                  {
                    if(start < 0)
                    {
                      return;
                    }
                    UITouch *touch = (UITouch *)[touches anyObject];
                    CGFloat now = [touch locationInView:self.superview].y;
                    CGFloat diff = now - start;
                    directionUp = diff < 0;//directionUp is a BOOL member of this view
                    float nuCenterY = pulldownView.center.y + diff;
                    pulldownView.center = CGPointMake(pulldownView.center.x, nuCenterY);
                    start = now;
                  }
                  
                  
                  -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
                  {
                    if (directionUp)
                    {
                      //animate pulldownView out of visibel area
                      [UIView animateWithDuration:.3 animations:^{pulldownView.center = CGPointMake(pulldownView.center.x, -roundf(pulldownView.bounds.size.height/2.));}];
                    }
                    else if(start>=0)
                    {
                      //animate pulldownView with top to mainviews top
                      [UIView animateWithDuration:.3 animations:^{pulldownView.center = CGPointMake(pulldownView.center.x, roundf(pulldownView.bounds.size.height/2.));}];
                    }
                  }
                  

                  這篇關于在 iOS 5 中下拉 UIView的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 故事板,以編程方式確定路徑)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))
                  Semantic Issue: Property#39;s synthesized getter follows Cocoa naming convention for returning #39;owned#39; objects(語義問題:屬性的合成 getter 遵循 Cocoa 命名約定以返回“擁有對象) - IT屋-程序員軟件開發技術分享

                      1. <legend id='B1Yfq'><style id='B1Yfq'><dir id='B1Yfq'><q id='B1Yfq'></q></dir></style></legend>

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

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

                            <bdo id='B1Yfq'></bdo><ul id='B1Yfq'></ul>

                          • <tfoot id='B1Yfq'></tfoot>
                          • 主站蜘蛛池模板: 欧美福利视频一区 | 中文在线一区 | 亚洲一区二区精品视频在线观看 | 国产精品免费一区二区三区四区 | 国产福利资源在线 | 一级做a | 精品久久亚洲 | 97国产精品视频人人做人人爱 | 亚洲电影成人 | 日韩精品 电影一区 亚洲 | 欧美精品一区二区在线观看 | www久久久 | 日韩1区| 国产在线第一页 | 嫩草最新网址 | www日韩| 国产精品久久久久久久久久久久冷 | 无吗视频 | 激情五月激情综合网 | 黄色在线观看网址 | 一区二区三区欧美 | 国产精品久久片 | 国产一区二区久久 | 国产精品久久久久久久久久免费 | 午夜精品一区二区三区在线观看 | 亚洲欧美在线视频 | 亚洲国产成人精品一区二区 | 精品不卡 | 久久99国产精一区二区三区 | 九九九久久国产免费 | 成人av在线网站 | 97高清国语自产拍 | 精品视频99 | 国产日韩免费观看 | 在线成人 | 国产高清在线观看 | 操操操操操 | 亚洲最新在线视频 | 欧美精品久久久 | 中文字幕在线观看日韩 | 一区二区在线免费观看 |