public class UIPageControl extends UIControl
NoIntrinsicMetric| Constructor and Description |
|---|
UIPageControl()
Constructs a default UIPageControl object located at (0,0) with 0 weight
and 0 height.
|
UIPageControl(CGRect rect)
Constructs a UIPageControl object initialized with the dimensions and
position specified in the rect parameter.
|
| Modifier and Type | Method and Description |
|---|---|
int |
currentPage()
Returns the number that corresponds to the current shown page(white
dot).The number of the first page is 0.
|
UIColor |
currentPageIndicatorTintColor()
Returns the color of the page indicator.
|
boolean |
defersCurrentPageDisplay()
Returns a Boolean that controls whether indicator's current page is
rendered.
|
void |
drawRect(CGRect rect3)
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.
|
boolean |
hidesForSinglePage()
Returns a Boolean that shows whether the page control is hidden for one
page.
|
int |
numberOfPages()
Returns the number of pages represented as dots.
|
UIColor |
pageIndicatorTintColor()
Returns the number of pages represented as dots.
|
void |
setCurrentPage(int currentPage)
Sets the current page shown as a white dot.
|
void |
setCurrentPageIndicatorTintColor(UIColor currentPageIndicatorTintColor)
Sets the color of the current page indicator.
|
void |
setDefersCurrentPageDisplay(boolean defersCurrentPageDisplay)
Sets a Boolean that controls whether indicator's current page is
rendered.
|
void |
setHidesForSinglePage(boolean hidesForSinglePage)
Sets a Boolean that defines whether the page control is hidden for one
page.
|
void |
setNumberOfPages(int numberOfPages)
Sets the number of pages represented as dots.
|
void |
setPageIndicatorTintColor(UIColor pageIndicatorTintColor)
Sets the color of the page indicator.
|
CGSize |
sizeForNumberOfPages(int pageCount)
Returns the size of this page control's bounds in order to accomodate the
specified number of pages.
|
void |
updateCurrentPageDisplay()
Updates the page indicator so that matches with the current page.
|
addTarget, allTargets, contentHorizontalAlignment, contentVerticalAlignment, hitTest, isEnabled, isHighlighted, isSelected, removeTarget, sendActionsForControlEvents, setContentHorizontalAlignment, setContentVerticalAlignment, setEnabled, setHighlighted, setSelected, state, touchesBegan, touchesCancelled, touchesEnded, touchesMovedaccessibilityIdentifier, 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, didAddSubview, didMoveToSuperview, didMoveToWindow, frame, gestureRecognizers, heightAnchor, insertSubview, insetsLayoutMarginsFromSafeArea, intrinsicContentSize, invalidateIntrinsicContentSize, isHidden, isMultipleTouchEnabled, isOpaque, isUserInteractionEnabled, layer, layoutIfNeeded, layoutMargins, layoutMarginsDidChange, layoutMarginsGuide, layoutSubviews, 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, windowbecomeFirstResponder, isFirstResponder, resignFirstResponderaddObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKeypublic UIPageControl()
public UIPageControl(CGRect rect)
rect - CGRect that defines dimension and position of UIPageControl.public CGSize sizeForNumberOfPages(int pageCount)
pageCount - The number of pages.public void updateCurrentPageDisplay()
public int currentPage()
public void setCurrentPage(int currentPage)
currentPage - The current page shown as a white dot.public boolean defersCurrentPageDisplay()
public void setDefersCurrentPageDisplay(boolean defersCurrentPageDisplay)
defersCurrentPageDisplay - A Boolean that controls whether the
current page of the indicator is displayed or not.TRUE delays rendering
updateCurrentPageDisplay is called.public boolean hidesForSinglePage()
public void setHidesForSinglePage(boolean hidesForSinglePage)
hidesForSinglePage - A Boolean that defines whether the page control
is hidden for one page.public int numberOfPages()
public void setNumberOfPages(int numberOfPages)
numberOfPages - The number of pages the receiver showspublic UIColor pageIndicatorTintColor()
public void setPageIndicatorTintColor(UIColor pageIndicatorTintColor)
pageIndicatorTintColor - The color of the page indicator.public UIColor currentPageIndicatorTintColor()
public void setCurrentPageIndicatorTintColor(UIColor currentPageIndicatorTintColor)
currentPageIndicatorTintColor - The color of the current page
indicator.Copyright © 2020. All rights reserved.