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

<tfoot id='a6gRU'></tfoot>

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

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

    1. <small id='a6gRU'></small><noframes id='a6gRU'>

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

    2. 當(dāng) hidesBottomBarWhenPushed 為“TRUE"時(shí)如何隱藏自

      How to hide custom tab bar button when hidesBottomBarWhenPushed is quot;TRUEquot;(當(dāng) hidesBottomBarWhenPushed 為“TRUE時(shí)如何隱藏自定義標(biāo)簽欄按鈕)
      <tfoot id='7JGal'></tfoot>

            <bdo id='7JGal'></bdo><ul id='7JGal'></ul>

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

              <i id='7JGal'><tr id='7JGal'><dt id='7JGal'><q id='7JGal'><span id='7JGal'><b id='7JGal'><form id='7JGal'><ins id='7JGal'></ins><ul id='7JGal'></ul><sub id='7JGal'></sub></form><legend id='7JGal'></legend><bdo id='7JGal'><pre id='7JGal'><center id='7JGal'></center></pre></bdo></b><th id='7JGal'></th></span></q></dt></tr></i><div class="pddf5bv" id='7JGal'><tfoot id='7JGal'></tfoot><dl id='7JGal'><fieldset id='7JGal'></fieldset></dl></div>
                  <tbody id='7JGal'></tbody>
              • <small id='7JGal'></small><noframes id='7JGal'>

                本文介紹了當(dāng) hidesBottomBarWhenPushed 為“TRUE"時(shí)如何隱藏自定義標(biāo)簽欄按鈕的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                限時(shí)送ChatGPT賬號..

                我正在使用 Tito 的代碼片段將自定義按鈕添加到我的標(biāo)簽欄:https://github.com/tciuro/CustomTabBar

                I am using the code snippet from Tito to add a custom button to my tab bar: https://github.com/tciuro/CustomTabBar

                (繼承 UITabbarController 并使用添加自定義按鈕

                (Subclassing UITabbarController and adding a custom button using

                // .. created a UIButton *button
                [self.view addSubview:button];
                

                )

                這對我的基于故事板的應(yīng)用程序非常有用,但導(dǎo)航控制器中的子視圖啟用了在推送時(shí)隱藏底欄"選項(xiàng)的情況除外.這會按承諾隱藏標(biāo)簽欄,但不會隱藏自定義按鈕.似乎按鈕應(yīng)該作為子視圖添加到標(biāo)簽欄本身?我嘗試了這個(gè)丑陋的代碼,它甚至沒有顯示按鈕:

                This works great with my storyboard-based app except for the case of a subview within a navigation controller with the option "Hides bottom bar on push" enabled. This hides the tab bar as promised, but not the custom button. Seems like the button should be added as a subview to the tab bar itself? I tried this ugly code which did not even make the button show up:

                for(UIView *view in self.view.subviews)
                {
                    if([view isKindOfClass:[UITabBar class]])
                    {
                        [view addSubview:button];
                        break;
                    }
                }
                

                有什么想法嗎?

                更新:我的解決方案:在我的 ApplicationDelegate 中,我定義了以下方法,只要需要,我就會在 viewWillAppear 或 viewWillDisappear 方法中調(diào)用它們:

                UPDATE: My solution: In my ApplicationDelegate i define the following methods, which i call whenever needed in the viewWillAppear or viewWillDisappear methods:

                -(void)hideCenterButton:(BOOL)animated
                {
                    if(animated){
                
                    [UIView animateWithDuration:0.3
                                          delay:0.0f
                                        options:UIViewAnimationCurveLinear
                                     animations:^{
                                         CGRect frame = self.centerButton.frame;
                                         frame.origin.x = -100;
                                         self.centerButton.frame = frame;
                                     }
                                     completion:^(BOOL finished){
                                     }];
                    }
                }
                
                -(void)showCenterButton:(BOOL)animated
                {
                    if(animated){
                
                    [UIView animateWithDuration:0.35
                                          delay:0.0f
                                        options:UIViewAnimationCurveLinear
                                     animations:^{
                                         CGRect frame = self.centerButton.frame;
                                         frame.origin.x = (self.view.superview.frame.size.width / 2) - (self.centerButton.frame.size.width / 2);
                                         self.centerButton.frame = frame;
                                     }
                                     completion:^(BOOL finished){
                                     }];
                    }
                }
                

                我必須將動(dòng)畫的持續(xù)時(shí)間設(shè)置為 0.35 秒才能獲得與標(biāo)簽欄相協(xié)調(diào)的平滑效果.

                I had to set the animation's duration to 0.35s to get a smooth effect in harmony with the tab bar.

                推薦答案

                我認(rèn)為有兩種方法可以解決這個(gè)問題.

                I think there are 2 ways you can got with this.

                1) 嘗試將按鈕放入舊頂視圖控制器上方的視圖和標(biāo)簽欄但在被推送的新頂視圖控制器下方的視圖中.

                1) try to get the button into a view that is above the old top view controller and the tab bar BUT below the new top view controller that is pushed.

                2) 當(dāng)新的視圖控制器被按下時(shí),按鈕動(dòng)畫消失.

                2) animate away the button when the new view controller is pushed.

                第一個(gè)需要處理未記錄、不受支持且隨時(shí)可能更改的 iOS 專有視圖層次結(jié)構(gòu).

                The first will require mucking with the iOS proprietary view hierarchy which is undocumented, unsupported and could change anytime.

                第二個(gè)問題是讓動(dòng)畫看起來足夠流暢,讓您的用戶不會注意到.這不完全是表現(xiàn)完美的問題,只是表現(xiàn)得恰到好處.

                The second will be a matter of making the animation appear smooth enough for your user not to notice. It's not entirely a matter of behaving perfect, just appearing appropriately.

                我個(gè)人會推薦按鈕消失的動(dòng)畫(將其 alpha 設(shè)置為 0)并根據(jù)您的視圖控制器越過標(biāo)簽欄是出現(xiàn)還是消失而重新出現(xiàn).

                I would personally recommend an animation of the the button disappearing (animate it's alpha to 0) and reappearing based on if your view controller that goes over the tab bar is appearing or disappearing.

                導(dǎo)航動(dòng)畫是(我相信)0.3 秒.如果按鈕位于標(biāo)簽欄的中間,您可能希望它在視圖控制器中的動(dòng)畫到達(dá)它時(shí)不可見(如果不是更早的話),因此可以使用 0.1 到 0.15 秒之間的時(shí)間將其動(dòng)畫出來.

                The animation for a navigation is (I believe) 0.3 seconds. If the button is in the middle of the tab bar, you'll likely want it invisible as the animating in view controller reaches it (if not sooner) so something between 0.1 and 0.15 seconds could be used to animate it out.

                現(xiàn)在這并沒有使按鈕的行為與標(biāo)簽欄完全相同,但是由于轉(zhuǎn)換的速度如此之短,用戶不會真正注意到它.

                Now this does not make the button behave exactly the same as the tab bar, but with the quickness of the transition being so short, it will be unnoticeable really to the user.

                現(xiàn)在只是提供一個(gè)問題讓您問自己.為什么需要推送一個(gè)與標(biāo)簽欄重疊的視圖控制器?為什么這比呈現(xiàn)模態(tài)視圖控制器更可取/必要?如果您可以強(qiáng)烈支持它,請堅(jiān)持下去,祝您好運(yùn),如果沒有必要,您也許可以使用模態(tài)視圖控制器獲得您想要的體驗(yàn).

                Now just to provide a question for you to ask yourself. Why do you need to push a view controller that overlaps the tab bar? Why is that more desirable/necessary than presenting a modal view controller? If you can strongly argue for it, keep at it and good luck, if it's not necessary however, you may be able to achieve the experience you want with a modal view controller.

                這篇關(guān)于當(dāng) hidesBottomBarWhenPushed 為“TRUE"時(shí)如何隱藏自定義標(biāo)簽欄按鈕的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點(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 屬性))
                  <tbody id='L84RZ'></tbody>

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

                  • <small id='L84RZ'></small><noframes id='L84RZ'>

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

                          主站蜘蛛池模板: BOE画框屏-触摸一体机-触控查询一体机-触摸屏一体机价格-厂家直销-触发电子 | ORP控制器_ORP电极价格-上优泰百科| 回转支承-转盘轴承-回转驱动生产厂家-洛阳隆达轴承有限公司 | 「阿尔法设计官网」工业设计_产品设计_产品外观设计 深圳工业设计公司 | CE认证_FCC认证_CCC认证_MFI认证_UN38.3认证-微测检测 CNAS实验室 | 中国产业发展研究网 - 提供行业研究报告 可行性研究报告 投资咨询 市场调研服务 | [官网]叛逆孩子管教_戒网瘾学校_全封闭问题青少年素质教育_新起点青少年特训学校 | 电磁流量计厂家_涡街流量计厂家_热式气体流量计-青天伟业仪器仪表有限公司 | 防火阀、排烟防火阀、电动防火阀产品生产销售商-德州凯亿空调设备有限公司 | 定制奶茶纸杯_定制豆浆杯_广东纸杯厂_[绿保佳]一家专业生产纸杯碗的厂家 | 水冷散热器_水冷电子散热器_大功率散热器_水冷板散热器厂家-河源市恒光辉散热器有限公司 | 农业四情_农业气象站_田间小型气象站_智慧农业气象站-山东风途物联网 | 河南中专学校|职高|技校招生-河南中职中专网 | 乐之康护 - 专业护工服务平台,提供医院陪护-居家照护-居家康复 | 定制防伪标签_防伪标签印刷_防伪标签厂家-510品保防伪网 | 学校用栓剂模,玻璃瓶轧盖钳,小型安瓿熔封机,实验室安瓿熔封机-长沙中亚制药设备有限公司 | 999范文网_优质范文下载写作帮手 | 螺旋绞龙叶片,螺旋输送机厂家,山东螺旋输送机-淄博长江机械制造有限公司 | 涂层测厚仪_漆膜仪_光学透过率仪_十大创新厂家-果欧电子科技公司 | 佛山市钱丰金属不锈钢蜂窝板定制厂家|不锈钢装饰线条|不锈钢屏风| 电梯装饰板|不锈钢蜂窝板不锈钢工艺板材厂家佛山市钱丰金属制品有限公司 | 欧美日韩国产一区二区三区不_久久久久国产精品无码不卡_亚洲欧洲美洲无码精品AV_精品一区美女视频_日韩黄色性爱一级视频_日本五十路人妻斩_国产99视频免费精品是看4_亚洲中文字幕无码一二三四区_国产小萍萍挤奶喷奶水_亚洲另类精品无码在线一区 | 品牌策划-品牌设计-济南之式传媒广告有限公司官网-提供品牌整合丨影视创意丨公关活动丨数字营销丨自媒体运营丨数字营销 | 校园文化空间设计-数字化|中医文化空间设计-党建|法治廉政主题文化空间施工-山东锐尚文化传播公司 | 智能门锁电机_智能门锁离合器_智能门锁电机厂家-温州劲力智能科技有限公司 | 交通信号灯生产厂家_红绿灯厂家_电子警察监控杆_标志杆厂家-沃霖电子科技 | 探伤仪,漆膜厚度测试仪,轮胎花纹深度尺厂家-淄博创宇电子 | 至顶网| 400电话_400电话申请_888元包年_400电话办理服务中心_400VIP网 | 阁楼货架_阁楼平台_仓库仓储设备_重型货架_广州金铁牛货架厂 | 印刷人才网 印刷、包装、造纸,中国80%的印刷企业人才招聘选印刷人才网! | 台湾阳明固态继电器-奥托尼克斯光电传感器-接近开关-温控器-光纤传感器-编码器一级代理商江苏用之宜电气 | 中视电广_短视频拍摄_短视频推广_短视频代运营_宣传片拍摄_影视广告制作_中视电广 | 昆明化妆培训-纹绣美甲-美容美牙培训-昆明博澜培训学校 | 塑料检查井_双扣聚氯乙烯增强管_双壁波纹管-河南中盈塑料制品有限公司 | 四川实木门_成都实木门 - 蓬溪聚成门业有限公司 | 济南拼接屏_山东液晶拼接屏_济南LED显示屏—维康国际官网 | ptc_浴霸_大巴_干衣机_呼吸机_毛巾架_电动车加热器-上海帕克 | ptc_浴霸_大巴_干衣机_呼吸机_毛巾架_电动车加热器-上海帕克 | 学校用栓剂模,玻璃瓶轧盖钳,小型安瓿熔封机,实验室安瓿熔封机-长沙中亚制药设备有限公司 | 优秀的临床医学知识库,临床知识库,医疗知识库,满足电子病历四级要求,免费试用 | 聚丙烯酰胺_阴离子_阳离子「用量少」巩义亿腾厂家直销,售后无忧 聚合甘油__盐城市飞龙油脂有限公司 |