UIScrollView
public extension UIScrollView
-
Adds refresh control. Call finishRefresh() to stop.
Declaration
Swift
func addRefreshControl(action: @escaping UIRefreshControl.Action) -
Adds refresh control. Call finishRefresh() to stop.
Declaration
Swift
func addRefreshControl(target: AnyObject?, action: Selector) -
Stops refresh
Declaration
Swift
func finishRefresh()
-
Returns
adjustedContentInseton iOS >= 11 andcontentInseton iOS < 11.Declaration
Swift
var fullContentInsets: UIEdgeInsets { get } -
Set value for top
contentInsetandscrollIndicatorInsetsDeclaration
Swift
func setTopInset(_ topInset: CGFloat) -
Set 64 for top
contentInsetandscrollIndicatorInsetsDeclaration
Swift
func setTopNavigationBarsInset() -
Set value for bottom
contentInsetandscrollIndicatorInsetsDeclaration
Swift
func setBottomInset(_ bottomInset: CGFloat) -
Set 49 for bottom
contentInsetandscrollIndicatorInsetsDeclaration
Swift
func setBottomTabBarInset()
-
Stops current scroll
Declaration
Swift
func stopScrolling() -
Scroll to top
Declaration
Swift
func scrollToTop(animated: Bool) -
Scroll to bottom
Declaration
Swift
func scrollToBottom(animated: Bool) -
Scroll to a specific view so that it’s top is at the top our scrollview
Declaration
Swift
func scrollToView(view: UIView, animated: Bool) -
Assures that contentOffset value is correct.
Declaration
Swift
func clampContentOffset()
-
Frame of the content.
Declaration
Swift
var contentFrame: CGRect { get } -
Scrollable frame. Equal to content size + fullContentInsets.
Declaration
Swift
var scrollableFrame: CGRect { get } -
Visible area frame. Equal to bounds.
Declaration
Swift
var visibleFrame: CGRect { get } -
Returns whether scrollable frame is more than visible frame
Declaration
Swift
var isScrollable: Bool { get }
-
Sets (status bar + 44) or 0 for top content inset and disables automatic mechanisms to prevent conflict. Returns true if scroll view avoids top bars. Takes into account
contentInsetAdjustmentBehavior.Declaration
Swift
@IBInspectable var avoidNavigationBar: Bool { get set } -
Sets 49 or 0 for bottom inset and disables automatic mechanisms to prevent conflict. Returns true if scroll view avoids bottom bars. Takes into account
contentInsetAdjustmentBehavior.Declaration
Swift
@IBInspectable var avoidTabBar: Bool { get set }
UIScrollView Extension Reference