public class UITableView extends UIScrollView
NoIntrinsicMetric
Constructor and Description |
---|
UITableView()
Constructs a default table view object located at (0,0) with 0 weight and
0 height.
|
UITableView(CGRect rect)
Constructs a table view that covers the specified rectangular area.
|
UITableView(CGRect rect,
int UITableViewStyle)
Constructs a table view with the particular style and size.The table view
is placed it in the specified position expressed in the coordinate system
of its superview.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsMultipleSelection()
Returns a Boolean that shows whether one or more row can be selected when
in default mode.
|
boolean |
allowsSelection()
Returns a Boolean that shows whether the user can select a row.
|
UITableViewDataSource |
dataSource()
Returns the data source of the table view.
|
void |
deleteRowsAtIndexPaths(List<NSIndexPath> indexPaths,
int UITableViewRowAnimation)
Deletes a list of rows specified by the index paths using animation or
not.
|
UITableViewCell |
dequeueReusableCellWithIdentifier(String identifier)
Returns a cell object specified by its identifier that is reused when
adding a new cell to the table view.
|
void |
deselectRowAtIndexPath(NSIndexPath indexPath,
boolean animation)
Deselects the row of the specified index path with animation or not.
|
void |
drawRect(CGRect rect)
This method is implicitly called when a view is first displayed or when
an event occurs that invalidates a visible part of the view and the view
needs to be redrawn.
|
double |
estimatedRowHeight() |
NSIndexPath |
indexPathForRowAtPoint(CGPoint p)
Returns the index path that identifies the row and section of the
specified point.
|
NSIndexPath |
indexPathForSelectedRow()
Returns the index path of the selected row.
|
List<NSIndexPath> |
indexPathsForSelectedRows()
Returns a list with the index paths of the selected rows.
|
List<NSIndexPath> |
indexPathsForVisibleRows()
Returns a list containing the index path of the visible rows of table
view.
|
void |
insertRowsAtIndexPaths(List<NSIndexPath> indexPaths,
int UITableViewRowAnimation)
Inserts rows in the table view in the positions specified by the index
paths using animation or not.
|
boolean |
isEditing()
Returns a Boolean that shows the mode of the table view(editing or
default)
|
void |
layoutSubviews()
Changes the layout of this view's subviews.
|
void |
registerClass(Class<? extends UITableViewCell> cellClass,
String identifier) |
void |
registerNib(UINib nib,
String identifier) |
void |
reloadData()
Reloads all the rows and sections.
|
void |
reloadRowsAtIndexPaths(List<NSIndexPath> indexPaths,
int UITableViewRowAnimation)
Reloads a list of rows specified by the index paths using animation in
order to emphasize the change.
|
double |
rowHeight()
Returns the height of the row.
|
void |
scrollToNearestSelectedRowAtScrollPosition(int UITableViewScrollPosition,
boolean animated)
Scrolls the table view, with animation or not, so that at the end of the
scrolling, the selected row is placed in the specified relative position
of the table view.
|
void |
scrollToRowAtIndexPath(NSIndexPath path,
int UITableViewScrollPosition,
boolean animated)
Scrolls the table view,with animation or not, so that at the end of the
scrolling, the row of that index path is placed in the specified relative
position of the table view.
|
double |
sectionFooterHeight()
Returns the height of the footers for this table view.
|
double |
sectionHeaderHeight()
Returns the height of the headers' section for this table view.
|
void |
selectRowAtIndexPath(NSIndexPath indexpath,
boolean animated,
int UITableViewScrollPosition)
Selects the row of the specified index path with animation or not,
scrolling this row according to specified relative position.
|
UIColor |
separatorColor()
Returns the color of the cell separator.
|
int |
separatorStyle()
Returns style of the cell separator.
|
void |
setAllowsMultipleSelection(boolean allowsMultipleSelection)
Set a Boolean that defines whether one or more row can be selected when
in default mode.
|
void |
setAllowsSelection(boolean allowsSelection)
Sets a Boolean that defines whether the user can select a row.
|
void |
setDataSource(UITableViewDataSource dataSource)
Sets the data source of the table view.
|
void |
setDelegate(UITableViewDelegate delegate)
Sets the delegate of the table view.
|
void |
setEditing(boolean editing)
Sets the mode of the table view(editing or default)
|
void |
setEditing(boolean editing,
boolean animated)
Switches between table view's editing and default mode with animation or
not.
|
void |
setEstimatedRowHeight(double estimatedRowHeight) |
void |
setRowHeight(double rowHeight)
Sets the height of the row.
|
void |
setSectionFooterHeight(double sectionFooterHeight)
Sets the height of the footers' section for this table view.
|
void |
setSectionHeaderHeight(double sectionHeaderHeight)
Sets the height of the headers' section for this table view.
|
void |
setSeparatorColor(UIColor separatorColor)
Sets the color of the cell separator.
|
void |
setSeparatorStyle(int UITableViewCellSeparatorStyle)
Sets the style of the cell separator.
|
UITableViewDelegate |
tableViewDelegate()
Returns the delegate of the table view.
|
addConstraint, alwaysBounceHorizontal, alwaysBounceVertical, bounces, canCancelContentTouches, constraints, contentInset, contentOffset, contentSize, decelerationRate, delaysContentTouches, delegate, flashScrollIndicators, hitTest, indicatorStyle, isDecelerating, isDirectionalLockEnabled, isDragging, isPagingEnabled, isScrollEnabled, isTracking, scrollIndicatorInsets, scrollRectToVisible, scrollsToTop, setAlwaysBounceHorizontal, setAlwaysBounceVertical, setBounces, setCanCancelContentTouches, setContentInset, setContentOffset, setContentOffset, setContentSize, setDecelerationRate, setDelaysContentTouches, setDelegate, setDirectionalLockEnabled, setIndicatorStyle, setPagingEnabled, setScrollEnabled, setScrollIndicatorInsets, setScrollsToTop, setShowsHorizontalScrollIndicator, setShowsVerticalScrollIndicator, showsHorizontalScrollIndicator, showsVerticalScrollIndicator, touchesBegan, touchesCancelled, touchesEnded, touchesMoved, touchesShouldBegin, touchesShouldCancelInContentView
accessibilityIdentifier, addConstraints, addGestureRecognizer, addLayoutGuide, addSubview, alpha, animateWithDuration, animateWithDuration, animateWithDuration, areAnimationsEnabled, autoresizesSubviews, autoresizingMask, backgroundColor, bottomAnchor, bounds, bringSubviewToFront, center, centerXAnchor, centerYAnchor, clipsToBounds, contentCompressionResistancePriorityForAxis, contentHuggingPriorityForAxis, contentMode, convertPointFromView, convertPointToView, convertRectFromView, convertRectToView, didAddSubview, didMoveToSuperview, didMoveToWindow, frame, gestureRecognizers, heightAnchor, insertSubview, insetsLayoutMarginsFromSafeArea, intrinsicContentSize, invalidateIntrinsicContentSize, isHidden, isMultipleTouchEnabled, isOpaque, isUserInteractionEnabled, layer, layoutIfNeeded, layoutMargins, layoutMarginsDidChange, layoutMarginsGuide, leadingAnchor, leftAnchor, maskView, needsUpdateConstraints, nextResponder, overrideUserInterfaceStyle, pointInside, preservesSuperviewLayoutMargins, removeConstraint, removeConstraints, removeFromSuperview, removeGestureRecognizer, removeLayoutGuide, requiresConstraintBasedLayout, restorationIdentifier, rightAnchor, safeAreaInsets, safeAreaLayoutGuide, sendSubviewToBack, setAccessibilityIdentifier, setAlpha, setAnimationBeginsFromCurrentState, setAnimationCurve, setAnimationDelay, setAnimationDuration, setAnimationRepeatAutoreverses, setAnimationRepeatCount, setAnimationsEnabled, setAnimationStartDate, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setCenter, setClearsContextBeforeDrawing, setClipsToBounds, setContentCompressionResistancePriority, setContentHuggingPriority, setContentMode, setFrame, setGestureRecognizers, setHidden, setInsetsLayoutMarginsFromSafeArea, setLayoutMargins, setMaskView, setMultipleTouchEnabled, setNeedsDisplay, setNeedsLayout, setNeedsUpdateConstraints, setOpaque, setOverrideUserInterfaceStyle, setPreservesSuperviewLayoutMargins, setRestorationIdentifier, setTag, setTintAdjustmentMode, setTintColor, setTransform, setTranslatesAutoresizingMaskIntoConstraints, setUserInteractionEnabled, sizeThatFits, sizeToFit, subviews, superview, tag, tintAdjustmentMode, tintColor, tintColorDidChange, topAnchor, toString, trailingAnchor, transform, transitionWithView, translatesAutoresizingMaskIntoConstraints, updateConstraints, updateConstraintsIfNeeded, userInterfaceLayoutDirection, viewForFirstBaselineLayout, viewForLastBaselineLayout, widthAnchor, willMoveToSuperview, willMoveToWindow, willRemoveSubview, window
becomeFirstResponder, isFirstResponder, resignFirstResponder
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public UITableView()
public UITableView(CGRect rect)
rect
- The rectangular area of the new table view.public UITableView(CGRect rect, int UITableViewStyle)
rect
- The size and position of the table view expressed in the
coordinate system of its superview.UITableViewStyle
- The style of the table view.UITableViewStyle
public void setDataSource(UITableViewDataSource dataSource)
dataSource
- The the data source of the table view.public void setDelegate(UITableViewDelegate delegate)
delegate
- The delegate of the table view.public UITableViewDelegate tableViewDelegate()
public UITableViewDataSource dataSource()
public UITableViewCell dequeueReusableCellWithIdentifier(String identifier)
identifier
- The string id of the cell object.NOT NULL.public void deleteRowsAtIndexPaths(List<NSIndexPath> indexPaths, int UITableViewRowAnimation)
indexPaths
- The list of the index paths of the rows to be deleted.UITableViewRowAnimation
- The type of the animationpublic void reloadData()
public void reloadRowsAtIndexPaths(List<NSIndexPath> indexPaths, int UITableViewRowAnimation)
indexPaths
- The list of the rows to be updated.UITableViewRowAnimation
- The animation used for the updating.UITableViewRowAnimation
public void insertRowsAtIndexPaths(List<NSIndexPath> indexPaths, int UITableViewRowAnimation)
indexPaths
- A list with index paths of the new rows.UITableViewRowAnimation
- TRUE if the insertion is animated.UITableViewRowAnimation
public void selectRowAtIndexPath(NSIndexPath indexpath, boolean animated, int UITableViewScrollPosition)
indexpath
- The index path of the row.animated
- TRUE if the change is animated.UITableViewScrollPosition
- The relative position of the table
view(top, middle, bottom).UITableViewScrollPosition
public void deselectRowAtIndexPath(NSIndexPath indexPath, boolean animation)
indexPath
- The index path of the row.animation
- TRUE if the change is animated.public NSIndexPath indexPathForSelectedRow()
public List<NSIndexPath> indexPathsForSelectedRows()
public UIColor separatorColor()
public void setSeparatorColor(UIColor separatorColor)
separatorColor
- The color of the cell separator.public int separatorStyle()
public void setSeparatorStyle(int UITableViewCellSeparatorStyle)
UITableViewCellSeparatorStyle
- The style of the cell separator.UITableViewCellSeparatorStyle
public boolean allowsSelection()
public void setAllowsSelection(boolean allowsSelection)
allowsSelection
- A Boolean that defines whether the user can select
a row.public boolean allowsMultipleSelection()
public void setAllowsMultipleSelection(boolean allowsMultipleSelection)
allowsMultipleSelection
- Boolean that defines whether one or more
row can be selected when in default mode.public boolean isEditing()
public void setEditing(boolean editing)
editing
- TRUE to set it to editing mode.public void setEditing(boolean editing, boolean animated)
editing
- TRUE for editing mode.animated
- TRUE for animated change.public double rowHeight()
public void setRowHeight(double rowHeight)
rowHeight
- The height of the row.public void setSectionHeaderHeight(double sectionHeaderHeight)
sectionHeaderHeight
- The height of the headers' section for this
table view.public double sectionHeaderHeight()
public void setSectionFooterHeight(double sectionFooterHeight)
sectionFooterHeight
- The height of the footers' section for this
table view.public double sectionFooterHeight()
public void scrollToNearestSelectedRowAtScrollPosition(int UITableViewScrollPosition, boolean animated)
UITableViewScrollPosition
- The relative position of the table view
at the end of the scrolling.(top, middle, bottom)animated
- TRUE for animated scrolling.public void scrollToRowAtIndexPath(NSIndexPath path, int UITableViewScrollPosition, boolean animated)
path
- The index path of the row.UITableViewScrollPosition
- The relative position of the row at the
end of the scrolling.(top, middle, bottom)animated
- TRUE for animated scrolling.UITableViewScrollPosition
public NSIndexPath indexPathForRowAtPoint(CGPoint p)
p
- The point expressed in the coordinate system of the table view.public List<NSIndexPath> indexPathsForVisibleRows()
public void layoutSubviews()
UIView
layoutSubviews
in class UIView
public void registerClass(Class<? extends UITableViewCell> cellClass, String identifier)
public void setEstimatedRowHeight(double estimatedRowHeight)
public double estimatedRowHeight()
Copyright © 2020. All rights reserved.