How can I make a UIScrollView
scroll to the bottom within my code? Or in a more generic way, to any point of a subview?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How can I add media attachments to my push notific
What if
contentSize
is lower thanbounds
?For Swift it is:
Xamarin.iOS version for
UICollectionView
of the accepted answer for ease in copying and pastingScroll To Top
Scroll To Bottom
Solution to scroll to last item of a table View :
Swift 3 :
You can use the UIScrollView's
setContentOffset:animated:
function to scroll to any part of the content view. Here's some code that would scroll to the bottom, assuming your scrollView isself.scrollView
:Hope that helps!
Category to the rescue!
Add this to a shared utility header somewhere:
And then to that utility implementation:
Then Implement it wherever you like, for instance: