pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<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="mcgguoe" 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="symmso2" 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="2u0kimy" 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>
                          • 主站蜘蛛池模板: 宁夏活性炭_防护活性炭_催化剂载体炭-宁夏恒辉活性炭有限公司 | 广州昊至泉水上乐园设备有限公司 | 深圳高新投三江工业消防解决方案提供厂家_服务商_园区智慧消防_储能消防解决方案服务商_高新投三江 | 全温度恒温培养摇床-大容量-立式-远红外二氧化碳培养箱|南荣百科 | 神超官网_焊接圆锯片_高速钢锯片_硬质合金锯片_浙江神超锯业制造有限公司 | 酒吧霸屏软件_酒吧霸屏系统,酒吧微上墙,夜场霸屏软件,酒吧点歌软件,酒吧互动游戏,酒吧大屏幕软件系统下载 | 存包柜厂家_电子存包柜_超市存包柜_超市电子存包柜_自动存包柜-洛阳中星 | b2b网站大全,b2b网站排名,找b2b网站就上地球网 | 生态板-实木生态板-生态板厂家-源木原作生态板品牌-深圳市方舟木业有限公司 | 管家婆-管家婆软件-管家婆辉煌-管家婆进销存-管家婆工贸ERP | 山东集装箱活动房|济南集装箱活动房-济南利森集装箱有限公司 | 美国查特CHART MVE液氮罐_查特杜瓦瓶_制造全球品质液氮罐 | 恒湿机_除湿加湿一体机_恒湿净化消毒一体机厂家-杭州英腾电器有限公司 | 贴片电容-贴片电阻-二三极管-国巨|三星|风华贴片电容代理商-深圳伟哲电子 | 气胀轴|气涨轴|安全夹头|安全卡盘|伺服纠偏系统厂家-天机传动 | wika威卡压力表-wika压力变送器-德国wika代理-威卡总代-北京博朗宁科技 | 空气净化器租赁,空气净化器出租,全国直租_奥司汀净化器租赁 | 国产频谱分析仪-国产网络分析仪-上海坚融实业有限公司 | 电销卡_北京电销卡_包月电话卡-豪付网络| 南溪在线-南溪招聘找工作、找房子、找对象,南溪综合生活信息门户! | 新型游乐设备,360大摆锤游乐设备「诚信厂家」-山东方鑫游乐设备 新能源汽车电池软连接,铜铝复合膜柔性连接,电力母排-容发智能科技(无锡)有限公司 | 卫生型双针压力表-高温防腐差压表-安徽康泰电气有限公司 | 泡沫消防车_水罐消防车_湖北江南专用特种汽车有限公司 | 浙江华锤电器有限公司_地磅称重设备_防作弊地磅_浙江地磅售后维修_无人值守扫码过磅系统_浙江源头地磅厂家_浙江工厂直营地磅 | 液氨泵,液化气泵-淄博「亚泰」燃气设备制造有限公司 | 重庆小面培训_重庆小面技术培训学习班哪家好【终身免费复学】 | 江苏全风,高压风机,全风环保风机,全风环形高压风机,防爆高压风机厂家-江苏全风环保科技有限公司(官网) | 橡胶接头_橡胶软接头_可曲挠橡胶接头-巩义市创伟机械制造有限公司 | 变色龙云 - 打包app_原生app_在线制作平台_短链接_ip查询 | 环保袋,无纺布袋,无纺布打孔袋,保温袋,环保袋定制,环保袋厂家,环雅包装-十七年环保袋定制厂家 | 防爆大气采样器-防爆粉尘采样器-金属粉尘及其化合物采样器-首页|盐城银河科技有限公司 | 北京翻译公司_同传翻译_字幕翻译_合同翻译_英语陪同翻译_影视翻译_翻译盖章-译铭信息 | 针焰试验仪,灼热丝试验仪,漏电起痕试验仪,水平垂直燃烧试验仪 - 苏州亚诺天下仪器有限公司 | 超声波清洗机-超声波清洗设备定制生产厂家 - 深圳市冠博科技实业有限公司 | LED灯杆屏_LED广告机_户外LED广告机_智慧灯杆_智慧路灯-太龙智显科技(深圳)有限公司 | 济南品牌包装设计公司_济南VI标志设计公司_山东锐尚文化传播 | 万博士范文网-您身边的范文参考网站Vanbs.com | 耙式干燥机_真空耙式干燥机厂家-无锡鹏茂化工装备有限公司 | 耙式干燥机_真空耙式干燥机厂家-无锡鹏茂化工装备有限公司 | 南汇8424西瓜_南汇玉菇甜瓜-南汇水蜜桃价格 | 大数据营销公司_舆情监测软件_上海SEO公司-文军营销官网 |