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

點擊屏幕頂部的狀態欄時,UITableView 滾動到頂部

UITableView scroll to top when tapping status bar at top of the screen(點擊屏幕頂部的狀態欄時,UITableView 滾動到頂部)
本文介紹了點擊屏幕頂部的狀態欄時,UITableView 滾動到頂部的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我在另一個 UIViewController 的視圖中插入了一個 UITableView.但是當我點擊屏幕頂部的狀態欄時;表格視圖不會滾動到頂部,這是 iOS 應用程序中的預期行為.

I inserted a UITableView inside another UIViewController's view. but when I tap the status bar at the top of the screen; the table view doesn't scroll to the top which is the expected behavior within iOS apps.

我試過了:

[self.tableView setScrollsToTop:YES];

但是當點擊屏幕頂部時tableview仍然沒有滾動到頂部.

but the tableview still not scroll to top when tap the top of the screen.

推薦答案

您必須在層次結構中的所有其他滾動視圖上將 scrollsToTop 設置為 NO.如果多個滾動視圖將 scrollsToTop 設置為 YES,則在觸摸狀態欄時它們都不會滾動到頂部.這在 scrollsToTop 屬性的文檔中有所提及.

You have to set scrollsToTop to NO on all the other scroll views in your hierarchy. If more than one scroll view has scrollsToTop set to YES, none of them will scroll to top when the status bar is touched. This is mentioned in the documentation of the scrollsToTop property.

請記住,這也適用于視圖層次結構中 UIScrollView 的任何子類,以及 UITableView、UIContainerView>UITextViewUIScrollView 的子類.

Keep in mind that this also applies to any subclasses of UIScrollView in your view hierarchy, and that UITableView, UIContainerView, and UITextView are subclasses of UIScrollView.

這篇關于點擊屏幕頂部的狀態欄時,UITableView 滾動到頂部的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

UIButtons at the bottom of UIScrollView not working(UIScrollView 底部的 UIButtons 不起作用)
scrollViewWillEndDragging:withVelocity:targetContentOffset: not working on the edges of a UISCrollView(scrollViewWillEndDragging:withVelocity:targetContentOffset: 不在 UISCrollView 的邊緣工作) - IT屋-程序員軟件開發技術分享社
ImageView Scaling when scrolling down(向下滾動時 ImageView 縮放)
Bounds automatically changes on UIScrollView with content insets(UIScrollView 上的邊界自動更改,帶有內容插圖)
iOS5 UITapRecognizer for UIScrollView interfering with buttons. How to fix?(用于 UIScrollView 的 iOS5 UITapRecognizer 干擾按鈕.怎么修?)
Handling scroll views with (custom, interactive) view controller presentation and dismissal(使用(自定義、交互式)視圖控制器呈現和解除處理滾動視圖)
主站蜘蛛池模板: 一区中文字幕 | 久久精品二区 | 久久综合九色综合欧美狠狠 | 亚洲三区视频 | 国产综合精品 | 91精品国产欧美一区二区成人 | 精品欧美一区二区三区 | 一区二区av在线 | 在线日韩在线 | www.久久久.com| h漫在线观看 | 成人网av | 91超碰在线 | 久久中文字幕一区 | 午夜成人免费视频 | 久久精品国产一区二区三区不卡 | 91久色 | 四季久久免费一区二区三区四区 | 成人精品国产免费网站 | 亚洲成人一区 | 精品久久香蕉国产线看观看亚洲 | 国产98色在线 | 日韩 | 亚洲成人国产综合 | 日韩中文字幕免费在线观看 | 色视频一区二区 | 一区二区三区国产精品 | www.av在线 | 精品视频亚洲 | 日屁网站 | 久久99深爱久久99精品 | 亚洲一区二区免费电影 | 亚洲国产精品一区二区久久 | 最新一级毛片 | av在线黄| 国产最好的av国产大片 | 97国产精品视频人人做人人爱 | 国产色视频网站 | 婷婷午夜天 | 6996成人影院网在线播放 | 日韩视频精品在线 | 自拍偷拍第一页 |