public class UITableViewCell extends UIView
NoIntrinsicMetric
Constructor and Description |
---|
UITableViewCell(int UITableViewCellStyle,
String reuseIdentifier)
Constructs a cell with the specified style and reuse identifier parameter
to use if the cell will be reused for multiple rows.
|
Modifier and Type | Method and Description |
---|---|
int |
accessoryType()
Returns the current type of accessory control that is used by the cell.
|
UIView |
accessoryView()
Returns a view displayed on the right side of the UITableViewCell and is
used for additional control options.
|
UIView |
backgroundView()
Returns the background view of the cell.
|
UIView |
contentView()
Returns the content view of the cell.
|
UILabel |
detailTextLabel()
Returns the additional label of the table cell, if there is one.
|
void |
didAddSubview(UIView subview)
Informs this view that a subview was added.
|
int |
editingStyle()
Returns the style of the cell.
|
UIImageView |
imageView()
Returns the image view of the table cell.
|
boolean |
isHighlighted()
Returns a Boolean that shows whether the cell is highlighted.
|
boolean |
isSelected()
Returns a Boolean that shows whether the cell is selected.
|
void |
layoutSubviews()
Changes the layout of this view's subviews.
|
void |
prepareForReuse()
Prepare this cell to be reused.
|
String |
reuseIdentifier()
Returns a string id for a reusable cell.
|
UIView |
selectedBackgroundView()
Returns the background of the selected cell.
|
int |
selectionStyle()
Returns the style of the selected cell.
|
void |
setAccessoryType(int UITableViewCellAccessoryType)
Sets the type of accessory control that is used by the cell.
|
void |
setAccessoryView(UIView accessoryView)
Sets a view displayed on the right side of the UITableViewCell and is
used for additional control options.
|
void |
setBackgroundColor(UIColor background)
Set this view's background color.
|
void |
setBackgroundView(UIView backgroundView)
Sets the background view of the cell.
|
void |
setHighlighted(boolean highlighted)
Sets a Boolean that defines whether the cell is highlighted.
|
void |
setSelected(boolean sel)
Sets a Boolean that defines whether the cell is selected.
|
void |
setSelectedBackgroundView(UIView selectedBackgroundView)
Sets the background of the selected cell.
|
void |
setSelectionStyle(int UITableViewCellSelectionStyle)
Sets the style of the selected cell.
|
CGSize |
sizeThatFits(CGSize size)
Returns a size for this view that fits the specified size in an optimal
way.
|
UILabel |
textLabel()
Returns the label of table cell.
|
accessibilityIdentifier, addConstraint, addConstraints, addGestureRecognizer, addLayoutGuide, addSubview, alpha, animateWithDuration, animateWithDuration, animateWithDuration, areAnimationsEnabled, autoresizesSubviews, autoresizingMask, backgroundColor, bottomAnchor, bounds, bringSubviewToFront, center, centerXAnchor, centerYAnchor, clipsToBounds, constraints, contentCompressionResistancePriorityForAxis, contentHuggingPriorityForAxis, contentMode, convertPointFromView, convertPointToView, convertRectFromView, convertRectToView, didMoveToSuperview, didMoveToWindow, drawRect, frame, gestureRecognizers, heightAnchor, hitTest, 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, 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, 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, touchesBegan, touchesCancelled, touchesEnded, touchesMoved
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public UITableViewCell(int UITableViewCellStyle, String reuseIdentifier)
UITableViewCellStyle
- The style of the cell.reuseIdentifier
- Used if the cell will be reused for multiple
rows.NULL if it will not be reused.UITableViewCellStyle
public void didAddSubview(UIView subview)
UIView
didAddSubview
in class UIView
subview
- The subview that was added to this view.public void layoutSubviews()
UIView
layoutSubviews
in class UIView
public int editingStyle()
UITableViewCellEditingStyle
public boolean isSelected()
public void setSelected(boolean sel)
sel
- A Boolean that defines whether the cell is selected.public boolean isHighlighted()
public void setHighlighted(boolean highlighted)
highlighted
- A Boolean that defines whether the cell is
highlighted.public void setBackgroundView(UIView backgroundView)
backgroundView
- The background view of the cell.public UIView backgroundView()
public void setSelectedBackgroundView(UIView selectedBackgroundView)
selectedBackgroundView
- The background of the selected cell.public UIView selectedBackgroundView()
public UIView contentView()
public UILabel textLabel()
public UILabel detailTextLabel()
public UIImageView imageView()
public String reuseIdentifier()
public int selectionStyle()
public void setSelectionStyle(int UITableViewCellSelectionStyle)
UITableViewCellSelectionStyle
- The style of the selected cell.UITableViewCellSelectionStyle
public void setAccessoryType(int UITableViewCellAccessoryType)
UITableViewCellAccessoryType
- The type of accessory control that is
used by the cell.UITableViewCellAccessoryType
public int accessoryType()
UITableViewCellAccessoryType
public UIView accessoryView()
public void setAccessoryView(UIView accessoryView)
accessoryView
- A view displayed on the right side of the
UITableViewCell and is used for additional control options.public void prepareForReuse()
public void setBackgroundColor(UIColor background)
UIView
setBackgroundColor
in class UIView
background
- The view’s background color.public CGSize sizeThatFits(CGSize size)
UIView
sizeThatFits
in class UIView
size
- The size for which the view should calculate its
optimal-fitting size.Copyright © 2020. All rights reserved.