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

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

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

      2. <small id='h6FOo'></small><noframes id='h6FOo'>

      3. 從底部加載 UITableView

        Load UITableView from the bottom(從底部加載 UITableView)

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

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

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

              • <bdo id='S0Nzj'></bdo><ul id='S0Nzj'></ul>
                  本文介紹了從底部加載 UITableView的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在嘗試使用 UITableView 來模仿 iMessage 氣泡文本行為.為了始終滾動到底部,我在 viewDidLoadviewDidAppear 時使用了 scrollToRowAtIndexPath.這是因為當調用 viewDidLoad 方法時,表格還沒有完全加載,所以我需要在 viewDidAppear 中額外滾動.這段代碼成功了.但是,我想要的不是動畫滾動(將 animated 設置為 NO 并不能解決此問題),我希望表格始終從底部顯示,而不是加載表,然后轉到最后一行.

                  I'm trying to mimic the iMessage bubble text behaviour with an UITableView. In order to always scroll to the bottom I'm using scrollToRowAtIndexPath when viewDidLoad and viewDidAppear. This is because when the viewDidLoad method is called, the table has not been completely loaded, so I need that extra scroll in viewDidAppear. This code makes the trick. However, what I want is not an animated scroll (setting animated to NO does not solve this), I want the table to be displayed always from the bottom, not load the table and then go to the last row.

                  這可能嗎?我找不到任何完全符合所需行為的解決方案.

                  Is this possible? I can't find any solution that fits completely with the desired behaviour.

                  推薦答案

                  您可以避免從 viewDidLoad 調用,因為從 viewDidAppear 中滾動會使第一次調用變得多余.每次導航回視圖時都會調用 viewDidAppear,但視圖初始化時只會調用一次 viewDidLoad.

                  You can avoid the call from viewDidLoad because scrolling from within viewDidAppear makes that first call redundant. viewDidAppear is called every time you navigate back to the view but viewDidLoad is only called once when the view is initialized.

                  我同意之前關于向用戶隱藏滾動而不是更改 UITableView 加載數(shù)據(jù)的方式的建議.我的建議是在 viewWillAppear 方法中使用 scrollToRowAtIndexPath 方法,并將動畫設置為 NO.之后,如果您必須在表格對用戶可見時添加新行,請使用 insertRowsAtIndexPaths:withRowAnimation: 在表格視圖底部添加一行.請務必注意在數(shù)據(jù)模型的末尾添加數(shù)據(jù),以便當用戶離開并返回時,他/她會回到相同的布局.

                  I would agree with earlier suggestions of hiding the scroll from the user instead of changing the way a UITableView is loading data. My suggestion would be to use the scrollToRowAtIndexPath method in the viewWillAppear method with animation set to NO. After that if you have to add a new row while the table is visible to the user, use insertRowsAtIndexPaths:withRowAnimation: to add a row at the bottom of the table view. Be sure to take care of adding the data at the end of your data model so that when the user navigates away and comes back, s/he comes back to the same layout.

                  希望這會有所幫助.

                  剛剛看到您不接受先前答案的原因,并認為我會再詳細說明一下.我提出的解決方案需要最少的努力,避免一次又一次地調用 reloadData ,從而避免一次又一次地調用 scrollToRowAtIndexPath 方法.您只需在 viewWillAppear 中調用一次 scrollToRowAtIndexPath 即可滾動到表格視圖的底部(這樣做時向用戶隱藏轉換),您無需再次這樣做.

                  edit: Just saw your reason for not accepting the previous answers and thought I'd elaborate a little more. The solution I propose would require minimum effort, avoid calling reloadData time and again and thus avoid calling the scrollToRowAtIndexPath method again and again. You only need to make one call to scrollToRowAtIndexPath in viewWillAppear to scroll to the bottom of the table view (hiding the transition from the user when doing so) and you wouldn't need to do that again.

                  這篇關于從底部加載 UITableView的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關文檔推薦

                  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 故事板,以編程方式確定路徑)
                  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 屬性))

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

                  <i id='XbQwM'><tr id='XbQwM'><dt id='XbQwM'><q id='XbQwM'><span id='XbQwM'><b id='XbQwM'><form id='XbQwM'><ins id='XbQwM'></ins><ul id='XbQwM'></ul><sub id='XbQwM'></sub></form><legend id='XbQwM'></legend><bdo id='XbQwM'><pre id='XbQwM'><center id='XbQwM'></center></pre></bdo></b><th id='XbQwM'></th></span></q></dt></tr></i><div class="2im2ws2" id='XbQwM'><tfoot id='XbQwM'></tfoot><dl id='XbQwM'><fieldset id='XbQwM'></fieldset></dl></div>
                1. <tfoot id='XbQwM'></tfoot>

                        <bdo id='XbQwM'></bdo><ul id='XbQwM'></ul>
                        <legend id='XbQwM'><style id='XbQwM'><dir id='XbQwM'><q id='XbQwM'></q></dir></style></legend>
                          <tbody id='XbQwM'></tbody>

                          • 主站蜘蛛池模板: 手持式浮游菌采样器-全排二级生物安全柜-浙江孚夏医疗科技有限公司 | 电动液压篮球架_圆管地埋式篮球架_移动平箱篮球架-强森体育 | PE一体化污水处理设备_地埋式生活污水净化槽定制厂家-岩康塑业 | 新能源汽车电池软连接,铜铝复合膜柔性连接,电力母排-容发智能科技(无锡)有限公司 | 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 - 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 | 济南菜鸟驿站广告|青岛快递车车体|社区媒体-抖音|墙体广告-山东揽胜广告传媒有限公司 | 脉冲布袋除尘器_除尘布袋-泊头市净化除尘设备生产厂家 | 济南网站建设_济南网站制作_济南网站设计_济南网站建设公司_富库网络旗下模易宝_模板建站 | 闸阀_截止阀_止回阀「生产厂家」-上海卡比阀门有限公司 | 无线联网门锁|校园联网门锁|学校智能门锁|公租房智能门锁|保障房管理系统-KEENZY中科易安 | 一体化污水处理设备-一体化净水设备-「山东梦之洁水处理」 | 丙烷/液氧/液氮气化器,丙烷/液氧/液氮汽化器-无锡舍勒能源科技有限公司 | 破碎机锤头_合金耐磨锤头_郑州宇耐机械工程技术有限公司 | 模具ERP_模具管理系统_模具mes_模具进度管理_东莞市精纬软件有限公司 | China plate rolling machine manufacturer,cone rolling machine-Saint Fighter | 高铝矾土熟料_细粉_骨料_消失模_铸造用铝矾土_铝酸钙粉—嵩峰厂家 | 沈阳缠绕膜价格_沈阳拉伸膜厂家_沈阳缠绕膜厂家直销 | 气动球阀_衬氟蝶阀_调节阀_电动截止阀_上海沃托阀门有限公司 | 全自动包衣机-无菌分装隔离器-浙江迦南科技股份有限公司 | 篷房[仓储-婚庆-展览-活动]生产厂家-江苏正德装配式帐篷有限公司 | 粉末冶金注射成型厂家|MIM厂家|粉末冶金齿轮|MIM零件-深圳市新泰兴精密科技 | 清管器,管道清管器,聚氨酯发泡球,清管球 - 承德嘉拓设备 | 不锈钢丸厂家,铝丸,铸钢丸-淄博智源铸造材料有限公司 | 蔬菜配送公司|蔬菜配送中心|食材配送|饭堂配送|食堂配送-首宏公司 | 达利园物流科技集团-| 壹作文_中小学生优秀满分作文大全| 全自动五线打端沾锡机,全自动裁线剥皮双头沾锡机,全自动尼龙扎带机-东莞市海文能机械设备有限公司 | China plate rolling machine manufacturer,cone rolling machine-Saint Fighter | 重庆中专|职高|技校招生-重庆中专招生网 | 一航网络-软件测评官网 | 哈希PC1R1A,哈希CA9300,哈希SC4500-上海鑫嵩实业有限公司 | 通辽信息港 - 免费发布房产、招聘、求职、二手、商铺等信息 www.tlxxg.net | 齿轮减速机电机一体机_齿轮减速箱加电机一体化-德国BOSERL蜗轮蜗杆减速机电机生产厂家 | 镀锌角钢_槽钢_扁钢_圆钢_方矩管厂家_镀锌花纹板-海邦钢铁(天津)有限公司 | 快速门厂家批发_PVC快速卷帘门_高速门_高速卷帘门-广州万盛门业 快干水泥|桥梁伸缩缝止水胶|伸缩缝装置生产厂家-广东广航交通科技有限公司 | 精密钢管,冷拔精密无缝钢管,精密钢管厂,精密钢管制造厂家,精密钢管生产厂家,山东精密钢管厂家 | 电杆荷载挠度测试仪-电杆荷载位移-管桩测试仪-北京绿野创能机电设备有限公司 | 水稻烘干机,小麦烘干机,大豆烘干机,玉米烘干机,粮食烘干机_巩义市锦华粮食烘干机械制造有限公司 水环真空泵厂家,2bv真空泵,2be真空泵-淄博真空设备厂 | YT保温材料_YT无机保温砂浆_外墙保温材料_南阳银通节能建材高新技术开发有限公司 | 磁力去毛刺机_去毛刺磁力抛光机_磁力光饰机_磁力滚抛机_精密金属零件去毛刺机厂家-冠古科技 | 船老大板材_浙江船老大全屋定制_船老大官网 |