久久久久久久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的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送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 加載數據的方式的建議.我的建議是在 viewWillAppear 方法中使用 scrollToRowAtIndexPath 方法,并將動畫設置為 NO.之后,如果您必須在表格對用戶可見時添加新行,請使用 insertRowsAtIndexPaths:withRowAnimation: 在表格視圖底部添加一行.請務必注意在數據模型的末尾添加數據,以便當用戶離開并返回時,他/她會回到相同的布局.

                  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模板網!

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

                  相關文檔推薦

                  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(圖標已經包含光澤效果)
                  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="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>

                          • 主站蜘蛛池模板: 久久精品97| 国产欧美日韩精品一区 | 91资源在线 | 国产最新视频在线 | 一区二区精品电影 | 国产一区二区三区在线 | 国产精品久久久久久久 | 日韩欧美中文 | 欧美亚洲国产一区 | 毛片99| 激情欧美一区二区三区 | 午夜日韩 | 国产综合久久久久久鬼色 | 欧美中文字幕 | 精品国产乱码久久久久久丨区2区 | 日韩成人免费在线视频 | 国产精品美女久久久久aⅴ国产馆 | 97视频人人澡人人爽 | 成人一级片在线观看 | 久久精品日产第一区二区三区 | 免费超碰| 欧州一区 | 中文字幕一区二区三区日韩精品 | 国产在线高清 | 免费黄色片在线观看 | 日韩精品一区二区三区四区 | 国产精品视频在线免费观看 | 天天插天天操 | 精品一区二区久久久久久久网精 | 精品乱子伦一区二区三区 | 啪一啪 | 国产精品久久久久久二区 | av在线伊人 | 在线播放中文 | 日韩1区2区 | 天天爽网站| 国产二区三区 | 亚洲精久 | av在线一区二区三区 | 精品视频一区二区三区在线观看 | 成人美女免费网站视频 |