Class UIScrollView

All Implemented Interfaces:
CALayerDelegate, NSCoding, NSObjectProtocol, UIAccessibilityIdentification, UIActivityItemsConfigurationProviding, UIAppearanceContainer, UICoordinateSpace, UIDynamicItem, UIFocusEnvironment, UIFocusItem, UIFocusItemContainer, UIFocusItemScrollableContainer, UILargeContentViewerItem, UIPasteConfigurationSupporting, UIResponderStandardEditActions, UITraitEnvironment, UIUserActivityRestoring, ObjCProtocol
Direct Known Subclasses:
PKCanvasView, UICollectionView, UITableView, UITextView

public class UIScrollView
extends UIView
implements NSCoding, UIFocusItemScrollableContainer
  • Constructor Details

    • UIScrollView

      public UIScrollView()
    • UIScrollView

      protected UIScrollView​(NSObject.Handle h, long handle)
    • UIScrollView

      protected UIScrollView​(NSObject.SkipInit skipInit)
    • UIScrollView

      public UIScrollView​(CGRect frame)
    • UIScrollView

      public UIScrollView​(NSCoder coder)
  • Method Details

    • getContentOffset

      public CGPoint getContentOffset()
      Specified by:
      getContentOffset in interface UIFocusItemScrollableContainer
    • setContentOffset

      public void setContentOffset​(CGPoint v)
      Specified by:
      setContentOffset in interface UIFocusItemScrollableContainer
    • getContentSize

      public CGSize getContentSize()
      Specified by:
      getContentSize in interface UIFocusItemScrollableContainer
    • setContentSize

      public void setContentSize​(CGSize v)
    • getContentInset

      public UIEdgeInsets getContentInset()
    • setContentInset

      public void setContentInset​(UIEdgeInsets v)
    • getAdjustedContentInset

      public UIEdgeInsets getAdjustedContentInset()
      Since:
      Available in iOS 11.0 and later.
    • getContentInsetAdjustmentBehavior

      public UIScrollViewContentInsetAdjustmentBehavior getContentInsetAdjustmentBehavior()
      Since:
      Available in iOS 11.0 and later.
    • setContentInsetAdjustmentBehavior

      public void setContentInsetAdjustmentBehavior​(UIScrollViewContentInsetAdjustmentBehavior v)
      Since:
      Available in iOS 11.0 and later.
    • automaticallyAdjustsScrollIndicatorInsets

      public boolean automaticallyAdjustsScrollIndicatorInsets()
      Since:
      Available in iOS 13.0 and later.
    • setAutomaticallyAdjustsScrollIndicatorInsets

      public void setAutomaticallyAdjustsScrollIndicatorInsets​(boolean v)
      Since:
      Available in iOS 13.0 and later.
    • getContentLayoutGuide

      public UILayoutGuide getContentLayoutGuide()
      Since:
      Available in iOS 11.0 and later.
    • getFrameLayoutGuide

      public UILayoutGuide getFrameLayoutGuide()
      Since:
      Available in iOS 11.0 and later.
    • getDelegate

      public UIScrollViewDelegate getDelegate()
    • setDelegate

      public void setDelegate​(UIScrollViewDelegate v)
    • isDirectionalLockEnabled

      public boolean isDirectionalLockEnabled()
    • setDirectionalLockEnabled

      public void setDirectionalLockEnabled​(boolean v)
    • bounces

      public boolean bounces()
    • setBounces

      public void setBounces​(boolean v)
    • alwaysBounceVertical

      public boolean alwaysBounceVertical()
    • setAlwaysBounceVertical

      public void setAlwaysBounceVertical​(boolean v)
    • alwaysBounceHorizontal

      public boolean alwaysBounceHorizontal()
    • setAlwaysBounceHorizontal

      public void setAlwaysBounceHorizontal​(boolean v)
    • isPagingEnabled

      public boolean isPagingEnabled()
    • setPagingEnabled

      public void setPagingEnabled​(boolean v)
    • isScrollEnabled

      public boolean isScrollEnabled()
    • setScrollEnabled

      public void setScrollEnabled​(boolean v)
    • showsVerticalScrollIndicator

      public boolean showsVerticalScrollIndicator()
    • setShowsVerticalScrollIndicator

      public void setShowsVerticalScrollIndicator​(boolean v)
    • showsHorizontalScrollIndicator

      public boolean showsHorizontalScrollIndicator()
    • setShowsHorizontalScrollIndicator

      public void setShowsHorizontalScrollIndicator​(boolean v)
    • getIndicatorStyle

      public UIScrollViewIndicatorStyle getIndicatorStyle()
    • setIndicatorStyle

      public void setIndicatorStyle​(UIScrollViewIndicatorStyle v)
    • getVerticalScrollIndicatorInsets

      public UIEdgeInsets getVerticalScrollIndicatorInsets()
      Since:
      Available in iOS 11.1 and later.
    • setVerticalScrollIndicatorInsets

      public void setVerticalScrollIndicatorInsets​(UIEdgeInsets v)
      Since:
      Available in iOS 11.1 and later.
    • getHorizontalScrollIndicatorInsets

      public UIEdgeInsets getHorizontalScrollIndicatorInsets()
      Since:
      Available in iOS 11.1 and later.
    • setHorizontalScrollIndicatorInsets

      public void setHorizontalScrollIndicatorInsets​(UIEdgeInsets v)
      Since:
      Available in iOS 11.1 and later.
    • getScrollIndicatorInsets

      public UIEdgeInsets getScrollIndicatorInsets()
    • setScrollIndicatorInsets

      public void setScrollIndicatorInsets​(UIEdgeInsets v)
    • getDecelerationRate

      public double getDecelerationRate()
    • setDecelerationRate

      public void setDecelerationRate​(double v)
    • getIndexDisplayMode

      public UIScrollViewIndexDisplayMode getIndexDisplayMode()
    • setIndexDisplayMode

      public void setIndexDisplayMode​(UIScrollViewIndexDisplayMode v)
    • isTracking

      public boolean isTracking()
    • isDragging

      public boolean isDragging()
    • isDecelerating

      public boolean isDecelerating()
    • delaysContentTouches

      public boolean delaysContentTouches()
    • setDelaysContentTouches

      public void setDelaysContentTouches​(boolean v)
    • canCancelContentTouches

      public boolean canCancelContentTouches()
    • setCanCancelContentTouches

      public void setCanCancelContentTouches​(boolean v)
    • getMinimumZoomScale

      public double getMinimumZoomScale()
    • setMinimumZoomScale

      public void setMinimumZoomScale​(double v)
    • getMaximumZoomScale

      public double getMaximumZoomScale()
    • setMaximumZoomScale

      public void setMaximumZoomScale​(double v)
    • getZoomScale

      public double getZoomScale()
    • setZoomScale

      public void setZoomScale​(double v)
    • bouncesZoom

      public boolean bouncesZoom()
    • setBouncesZoom

      public void setBouncesZoom​(boolean v)
    • isZooming

      public boolean isZooming()
    • isZoomBouncing

      public boolean isZoomBouncing()
    • scrollsToTop

      public boolean scrollsToTop()
    • setScrollsToTop

      public void setScrollsToTop​(boolean v)
    • getPanGestureRecognizer

      public UIPanGestureRecognizer getPanGestureRecognizer()
    • getPinchGestureRecognizer

      public UIPinchGestureRecognizer getPinchGestureRecognizer()
    • getDirectionalPressGestureRecognizer

      public UIGestureRecognizer getDirectionalPressGestureRecognizer()
    • getKeyboardDismissMode

      public UIScrollViewKeyboardDismissMode getKeyboardDismissMode()
    • setKeyboardDismissMode

      public void setKeyboardDismissMode​(UIScrollViewKeyboardDismissMode v)
    • getRefreshControl

      public UIRefreshControl getRefreshControl()
      Since:
      Available in iOS 10.0 and later.
    • setRefreshControl

      public void setRefreshControl​(UIRefreshControl v)
      Since:
      Available in iOS 10.0 and later.
    • getLayerClass

      public static Class<? extends CALayer> getLayerClass()
    • getVisibleSize

      public CGSize getVisibleSize()
      Specified by:
      getVisibleSize in interface UIFocusItemScrollableContainer
    • getNormalDecelerationRate

      public static double getNormalDecelerationRate()
    • getFastDecelerationRate

      public static double getFastDecelerationRate()
    • adjustedContentInsetDidChange

      public void adjustedContentInsetDidChange()
      Since:
      Available in iOS 11.0 and later.
    • setContentOffset

      public void setContentOffset​(CGPoint contentOffset, boolean animated)
    • scrollRectToVisible

      public void scrollRectToVisible​(CGRect rect, boolean animated)
    • flashScrollIndicators

      public void flashScrollIndicators()
    • touchesShouldBegin

      public boolean touchesShouldBegin​(NSSet<UITouch> touches, UIEvent event, UIView view)
    • touchesShouldCancelInContentView

      public boolean touchesShouldCancelInContentView​(UIView view)
    • setZoomScale

      public void setZoomScale​(double scale, boolean animated)
    • zoomToRect

      public void zoomToRect​(CGRect rect, boolean animated)
    • getUserInterfaceLayoutDirection

      public static UIUserInterfaceLayoutDirection getUserInterfaceLayoutDirection​(UISemanticContentAttribute attribute)
      Since:
      Available in iOS 9.0 and later.
    • getUserInterfaceLayoutDirection

      public static UIUserInterfaceLayoutDirection getUserInterfaceLayoutDirection​(UISemanticContentAttribute semanticContentAttribute, UIUserInterfaceLayoutDirection layoutDirection)
      Since:
      Available in iOS 10.0 and later.