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

  • <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="qwawimqqmiuu" 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="qwawimqqmiuu" 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的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我正在嘗試使用 UITableView 來(lái)模仿 iMessage 氣泡文本行為.為了始終滾動(dòng)到底部,我在 viewDidLoadviewDidAppear 時(shí)使用了 scrollToRowAtIndexPath.這是因?yàn)楫?dāng)調(diào)用 viewDidLoad 方法時(shí),表格還沒(méi)有完全加載,所以我需要在 viewDidAppear 中額外滾動(dòng).這段代碼成功了.但是,我想要的不是動(dòng)畫(huà)滾動(dòng)(將 animated 設(shè)置為 NO 并不能解決此問(wèn)題),我希望表格始終從底部顯示,而不是加載表,然后轉(zhuǎn)到最后一行.

                  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 調(diào)用,因?yàn)閺?viewDidAppear 中滾動(dòng)會(huì)使第一次調(diào)用變得多余.每次導(dǎo)航回視圖時(shí)都會(huì)調(diào)用 viewDidAppear,但視圖初始化時(shí)只會(huì)調(diào)用一次 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.

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

                  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.

                  希望這會(huì)有所幫助.

                  剛剛看到您不接受先前答案的原因,并認(rèn)為我會(huì)再詳細(xì)說(shuō)明一下.我提出的解決方案需要最少的努力,避免一次又一次地調(diào)用 reloadData ,從而避免一次又一次地調(diào)用 scrollToRowAtIndexPath 方法.您只需在 viewWillAppear 中調(diào)用一次 scrollToRowAtIndexPath 即可滾動(dòng)到表格視圖的底部(這樣做時(shí)向用戶隱藏轉(zhuǎn)換),您無(wú)需再次這樣做.

                  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.

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

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

                  相關(guān)文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過(guò)點(diǎn)擊動(dòng)畫(huà) 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 屬性))

                  <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="qwawimqqmiuu" 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>

                          • 主站蜘蛛池模板: 久久久夜夜夜 | 九九视频在线观看 | 羞羞色在线观看 | 九九热在线视频 | 精品成人 | www国产亚洲精品久久网站 | 99精品国自产在线观看 | 久久精品一级 | 一区二区视频在线 | 成年人视频免费在线观看 | 视频二区国产 | 在线成人免费视频 | 99精品视频在线 | 欧美理伦片在线播放 | 成人精品啪啪欧美成 | 日本激情视频网 | 日韩免费一区二区 | 91精品久久久久久久99 | 最新中文字幕在线 | 国产一级视频在线 | 亚洲色图在线观看 | 亚洲免费在线 | 韩日在线视频 | 精品视频久久久久久 | 国产精品免费在线 | 就操在线 | 亚洲毛片一区二区 | 一级高清免费毛片 | 久久精品一级 | 综合久久久 | 一级免费毛片 | 久草热播 | 综合亚洲视频 | 国产综合精品 | 正在播放国产精品 | 日日操夜夜摸 | 日韩美av| 久久久久久久一区 | 一区二区三区在线电影 | 亚洲精品一区二区三区蜜桃久 | 天堂中文在线播放 |