Class UITableView

All Implemented Interfaces:
CALayerDelegate, NSCoding, NSObjectProtocol, UIAccessibilityIdentification, UIActivityItemsConfigurationProviding, UIAppearanceContainer, UICoordinateSpace, UIDataSourceTranslating, UIDynamicItem, UIFocusEnvironment, UIFocusItem, UIFocusItemContainer, UIFocusItemScrollableContainer, UILargeContentViewerItem, UIPasteConfigurationSupporting, UIResponderStandardEditActions, UISpringLoadedInteractionSupporting, UITraitEnvironment, UIUserActivityRestoring, ObjCProtocol

public class UITableView
extends UIScrollView
implements NSCoding, UIDataSourceTranslating, UISpringLoadedInteractionSupporting
  • Constructor Details

    • UITableView

      public UITableView()
    • UITableView

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

      protected UITableView​(NSObject.SkipInit skipInit)
    • UITableView

      public UITableView​(CGRect frame, UITableViewStyle style)
    • UITableView

      public UITableView​(NSCoder coder)
    • UITableView

      public UITableView​(CGRect frame)
  • Method Details

    • getStyle

      public UITableViewStyle getStyle()
    • getDataSource

      public UITableViewDataSource getDataSource()
    • setDataSource

      public void setDataSource​(UITableViewDataSource v)
    • getDelegate

      public UITableViewDelegate getDelegate()
      Overrides:
      getDelegate in class UIScrollView
    • setDelegate

      public void setDelegate​(UITableViewDelegate v)
    • getPrefetchDataSource

      public UITableViewDataSourcePrefetching getPrefetchDataSource()
      Since:
      Available in iOS 10.0 and later.
    • setPrefetchDataSource

      public void setPrefetchDataSource​(UITableViewDataSourcePrefetching v)
      Since:
      Available in iOS 10.0 and later.
    • isPrefetchingEnabled

      public boolean isPrefetchingEnabled()
      Since:
      Available in iOS 15.0 and later.
    • setPrefetchingEnabled

      public void setPrefetchingEnabled​(boolean v)
      Since:
      Available in iOS 15.0 and later.
    • getDragDelegate

      public UITableViewDragDelegate getDragDelegate()
      Since:
      Available in iOS 11.0 and later.
    • setDragDelegate

      public void setDragDelegate​(UITableViewDragDelegate v)
      Since:
      Available in iOS 11.0 and later.
    • getDropDelegate

      public UITableViewDropDelegate getDropDelegate()
      Since:
      Available in iOS 11.0 and later.
    • setDropDelegate

      public void setDropDelegate​(UITableViewDropDelegate v)
      Since:
      Available in iOS 11.0 and later.
    • getRowHeight

      public double getRowHeight()
    • setRowHeight

      public void setRowHeight​(double v)
    • getSectionHeaderHeight

      public double getSectionHeaderHeight()
    • setSectionHeaderHeight

      public void setSectionHeaderHeight​(double v)
    • getSectionFooterHeight

      public double getSectionFooterHeight()
    • setSectionFooterHeight

      public void setSectionFooterHeight​(double v)
    • getEstimatedRowHeight

      public double getEstimatedRowHeight()
    • setEstimatedRowHeight

      public void setEstimatedRowHeight​(double v)
    • getEstimatedSectionHeaderHeight

      public double getEstimatedSectionHeaderHeight()
    • setEstimatedSectionHeaderHeight

      public void setEstimatedSectionHeaderHeight​(double v)
    • getEstimatedSectionFooterHeight

      public double getEstimatedSectionFooterHeight()
    • setEstimatedSectionFooterHeight

      public void setEstimatedSectionFooterHeight​(double v)
    • getFillerRowHeight

      public double getFillerRowHeight()
      Since:
      Available in iOS 15.0 and later.
    • setFillerRowHeight

      public void setFillerRowHeight​(double v)
      Since:
      Available in iOS 15.0 and later.
    • getSectionHeaderTopPadding

      public double getSectionHeaderTopPadding()
      Since:
      Available in iOS 15.0 and later.
    • setSectionHeaderTopPadding

      public void setSectionHeaderTopPadding​(double v)
      Since:
      Available in iOS 15.0 and later.
    • getSeparatorInset

      public UIEdgeInsets getSeparatorInset()
    • setSeparatorInset

      public void setSeparatorInset​(UIEdgeInsets v)
    • getSeparatorInsetReference

      public UITableViewSeparatorInsetReference getSeparatorInsetReference()
      Since:
      Available in iOS 11.0 and later.
    • setSeparatorInsetReference

      public void setSeparatorInsetReference​(UITableViewSeparatorInsetReference v)
      Since:
      Available in iOS 11.0 and later.
    • getBackgroundView

      public UIView getBackgroundView()
    • setBackgroundView

      public void setBackgroundView​(UIView v)
    • getContextMenuInteraction

      public UIContextMenuInteraction getContextMenuInteraction()
      Since:
      Available in iOS 14.0 and later.
    • getNumberOfSections

      public long getNumberOfSections()
    • getVisibleCells

      public NSArray<UITableViewCell> getVisibleCells()
    • getIndexPathsForVisibleRows

      public NSArray<NSIndexPath> getIndexPathsForVisibleRows()
    • hasUncommittedUpdates

      public boolean hasUncommittedUpdates()
      Since:
      Available in iOS 11.0 and later.
    • isEditing

      public boolean isEditing()
    • setEditing

      public void setEditing​(boolean v)
    • allowsSelection

      public boolean allowsSelection()
    • setAllowsSelection

      public void setAllowsSelection​(boolean v)
    • allowsSelectionDuringEditing

      public boolean allowsSelectionDuringEditing()
    • setAllowsSelectionDuringEditing

      public void setAllowsSelectionDuringEditing​(boolean v)
    • allowsMultipleSelection

      public boolean allowsMultipleSelection()
    • setAllowsMultipleSelection

      public void setAllowsMultipleSelection​(boolean v)
    • allowsMultipleSelectionDuringEditing

      public boolean allowsMultipleSelectionDuringEditing()
    • setAllowsMultipleSelectionDuringEditing

      public void setAllowsMultipleSelectionDuringEditing​(boolean v)
    • getIndexPathForSelectedRow

      public NSIndexPath getIndexPathForSelectedRow()
    • getIndexPathsForSelectedRows

      public NSArray<NSIndexPath> getIndexPathsForSelectedRows()
    • getSectionIndexMinimumDisplayRowCount

      public long getSectionIndexMinimumDisplayRowCount()
    • setSectionIndexMinimumDisplayRowCount

      public void setSectionIndexMinimumDisplayRowCount​(long v)
    • getSectionIndexColor

      public UIColor getSectionIndexColor()
    • setSectionIndexColor

      public void setSectionIndexColor​(UIColor v)
    • getSectionIndexBackgroundColor

      public UIColor getSectionIndexBackgroundColor()
    • setSectionIndexBackgroundColor

      public void setSectionIndexBackgroundColor​(UIColor v)
    • getSectionIndexTrackingBackgroundColor

      public UIColor getSectionIndexTrackingBackgroundColor()
    • setSectionIndexTrackingBackgroundColor

      public void setSectionIndexTrackingBackgroundColor​(UIColor v)
    • getSeparatorStyle

      public UITableViewCellSeparatorStyle getSeparatorStyle()
    • setSeparatorStyle

      public void setSeparatorStyle​(UITableViewCellSeparatorStyle v)
    • getSeparatorColor

      public UIColor getSeparatorColor()
    • setSeparatorColor

      public void setSeparatorColor​(UIColor v)
    • getSeparatorEffect

      public UIVisualEffect getSeparatorEffect()
    • setSeparatorEffect

      public void setSeparatorEffect​(UIVisualEffect v)
    • cellLayoutMarginsFollowReadableWidth

      public boolean cellLayoutMarginsFollowReadableWidth()
      Since:
      Available in iOS 9.0 and later.
    • setCellLayoutMarginsFollowReadableWidth

      public void setCellLayoutMarginsFollowReadableWidth​(boolean v)
      Since:
      Available in iOS 9.0 and later.
    • isInsetsContentViewsToSafeArea

      public boolean isInsetsContentViewsToSafeArea()
      Since:
      Available in iOS 11.0 and later.
    • setInsetsContentViewsToSafeArea

      public void setInsetsContentViewsToSafeArea​(boolean v)
      Since:
      Available in iOS 11.0 and later.
    • getTableHeaderView

      public UIView getTableHeaderView()
    • setTableHeaderView

      public void setTableHeaderView​(UIView v)
    • getTableFooterView

      public UIView getTableFooterView()
    • setTableFooterView

      public void setTableFooterView​(UIView v)
    • remembersLastFocusedIndexPath

      public boolean remembersLastFocusedIndexPath()
      Since:
      Available in iOS 9.0 and later.
    • setRemembersLastFocusedIndexPath

      public void setRemembersLastFocusedIndexPath​(boolean v)
      Since:
      Available in iOS 9.0 and later.
    • isSelectionFollowsFocus

      public boolean isSelectionFollowsFocus()
      Since:
      Available in iOS 14.0 and later.
    • setSelectionFollowsFocus

      public void setSelectionFollowsFocus​(boolean v)
      Since:
      Available in iOS 14.0 and later.
    • allowsFocus

      public boolean allowsFocus()
      Since:
      Available in iOS 15.0 and later.
    • setAllowsFocus

      public void setAllowsFocus​(boolean v)
      Since:
      Available in iOS 15.0 and later.
    • allowsFocusDuringEditing

      public boolean allowsFocusDuringEditing()
      Since:
      Available in iOS 15.0 and later.
    • setAllowsFocusDuringEditing

      public void setAllowsFocusDuringEditing​(boolean v)
      Since:
      Available in iOS 15.0 and later.
    • isDragInteractionEnabled

      public boolean isDragInteractionEnabled()
      Since:
      Available in iOS 11.0 and later.
    • setDragInteractionEnabled

      public void setDragInteractionEnabled​(boolean v)
      Since:
      Available in iOS 11.0 and later.
    • hasActiveDrag

      public boolean hasActiveDrag()
      Since:
      Available in iOS 11.0 and later.
    • hasActiveDrop

      public boolean hasActiveDrop()
      Since:
      Available in iOS 11.0 and later.
    • getLayerClass

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

      public boolean isSpringLoaded()
      Specified by:
      isSpringLoaded in interface UISpringLoadedInteractionSupporting
      Since:
      Available in iOS 11.0 and later.
    • setSpringLoaded

      public void setSpringLoaded​(boolean v)
      Specified by:
      setSpringLoaded in interface UISpringLoadedInteractionSupporting
      Since:
      Available in iOS 11.0 and later.
    • insertRow

      public void insertRow​(NSIndexPath indexPath, UITableViewRowAnimation animation)
    • deleteRow

      public void deleteRow​(NSIndexPath indexPath, UITableViewRowAnimation animation)
    • reloadRow

      public void reloadRow​(NSIndexPath indexPath, UITableViewRowAnimation animation)
    • setModel

      public void setModel​(UITableViewModel model)
    • getModel

      public UITableViewModel getModel()
    • getIndexSearch

      public static String getIndexSearch()
    • getAutomaticDimension

      public static double getAutomaticDimension()
    • SelectionDidChangeNotification

      public static NSString SelectionDidChangeNotification()
    • init

      protected long init​(CGRect frame, UITableViewStyle style)
    • init

      protected long init​(NSCoder coder)
      Overrides:
      init in class UIView
    • getNumberOfRowsInSection

      public long getNumberOfRowsInSection​(long section)
    • getRectForSection

      public CGRect getRectForSection​(long section)
    • getRectForHeaderInSection

      public CGRect getRectForHeaderInSection​(long section)
    • getRectForFooterInSection

      public CGRect getRectForFooterInSection​(long section)
    • getRectForRow

      public CGRect getRectForRow​(NSIndexPath indexPath)
    • getIndexPathForRow

      public NSIndexPath getIndexPathForRow​(CGPoint point)
    • getIndexPathForCell

      public NSIndexPath getIndexPathForCell​(UITableViewCell cell)
    • getIndexPathsForRowsInRect

      public NSArray<NSIndexPath> getIndexPathsForRowsInRect​(CGRect rect)
    • getCellForRow

      public UITableViewCell getCellForRow​(NSIndexPath indexPath)
    • getHeaderViewForSection

      public UITableViewHeaderFooterView getHeaderViewForSection​(long section)
    • getFooterViewForSection

      public UITableViewHeaderFooterView getFooterViewForSection​(long section)
    • scrollToRow

      public void scrollToRow​(NSIndexPath indexPath, UITableViewScrollPosition scrollPosition, boolean animated)
    • scrollToNearestSelectedRow

      public void scrollToNearestSelectedRow​(UITableViewScrollPosition scrollPosition, boolean animated)
    • performBatchUpdates

      public void performBatchUpdates​(Runnable updates, VoidBooleanBlock completion)
      Since:
      Available in iOS 11.0 and later.
    • beginUpdates

      public void beginUpdates()
    • endUpdates

      public void endUpdates()
    • insertSections

      public void insertSections​(NSIndexSet sections, UITableViewRowAnimation animation)
    • deleteSections

      public void deleteSections​(NSIndexSet sections, UITableViewRowAnimation animation)
    • moveSection

      public void moveSection​(long section, long newSection)
    • reloadSections

      public void reloadSections​(NSIndexSet sections, UITableViewRowAnimation animation)
    • insertRows

      public void insertRows​(NSArray<NSIndexPath> indexPaths, UITableViewRowAnimation animation)
    • deleteRows

      public void deleteRows​(NSArray<NSIndexPath> indexPaths, UITableViewRowAnimation animation)
    • moveRow

      public void moveRow​(NSIndexPath indexPath, NSIndexPath newIndexPath)
    • reloadRows

      public void reloadRows​(NSArray<NSIndexPath> indexPaths, UITableViewRowAnimation animation)
    • reconfigureRowsAtIndexPaths

      public void reconfigureRowsAtIndexPaths​(NSArray<NSIndexPath> indexPaths)
      Since:
      Available in iOS 15.0 and later.
    • reloadData

      public void reloadData()
    • reloadSectionIndexTitles

      public void reloadSectionIndexTitles()
    • setEditing

      public void setEditing​(boolean editing, boolean animated)
    • selectRow

      public void selectRow​(NSIndexPath indexPath, boolean animated, UITableViewScrollPosition scrollPosition)
    • deselectRow

      public void deselectRow​(NSIndexPath indexPath, boolean animated)
    • dequeueReusableCell

      public UITableViewCell dequeueReusableCell​(String identifier)
    • dequeueReusableCell

      public UITableViewCell dequeueReusableCell​(String identifier, NSIndexPath indexPath)
    • dequeueReusableHeaderFooterView

      public UITableViewHeaderFooterView dequeueReusableHeaderFooterView​(String identifier)
    • registerReusableCellNib

      public void registerReusableCellNib​(UINib nib, String identifier)
    • registerReusableCellClass

      public void registerReusableCellClass​(Class<? extends UITableViewCell> cellClass, String identifier)
    • registerReusableHeaderFooterViewNib

      public void registerReusableHeaderFooterViewNib​(UINib nib, String identifier)
    • registerReusableHeaderFooterViewClass

      public void registerReusableHeaderFooterViewClass​(Class<? extends UITableViewHeaderFooterView> aClass, String identifier)
    • 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.
    • presentationSectionIndexForDataSourceSectionIndex

      public long presentationSectionIndexForDataSourceSectionIndex​(long dataSourceSectionIndex)
      Specified by:
      presentationSectionIndexForDataSourceSectionIndex in interface UIDataSourceTranslating
    • dataSourceSectionIndexForPresentationSectionIndex

      public long dataSourceSectionIndexForPresentationSectionIndex​(long presentationSectionIndex)
      Specified by:
      dataSourceSectionIndexForPresentationSectionIndex in interface UIDataSourceTranslating
    • presentationIndexPathForDataSourceIndexPath

      public NSIndexPath presentationIndexPathForDataSourceIndexPath​(NSIndexPath dataSourceIndexPath)
      Specified by:
      presentationIndexPathForDataSourceIndexPath in interface UIDataSourceTranslating
    • dataSourceIndexPathForPresentationIndexPath

      public NSIndexPath dataSourceIndexPathForPresentationIndexPath​(NSIndexPath presentationIndexPath)
      Specified by:
      dataSourceIndexPathForPresentationIndexPath in interface UIDataSourceTranslating
    • performUsingPresentationValues

      public void performUsingPresentationValues​(Runnable actionsToTranslate)
      Specified by:
      performUsingPresentationValues in interface UIDataSourceTranslating