public class UINavigationBar extends UIView
NoIntrinsicMetric
Constructor and Description |
---|
UINavigationBar()
Constructs a default UINavigation object located at (0,0) with 0 weight
and 0 height.
|
UINavigationBar(CGRect rect)
Constructs a UINavigationBar object initialized with the dimensions and
position specified in the rect parameter.
|
Modifier and Type | Method and Description |
---|---|
UINavigationItem |
backItem()
Returns the item right after the top item of the navigation bar.
|
int |
barStyle()
Returns the style of this navigation bar.
|
UIColor |
barTintColor()
Returns the tint color of the navigation bar's background.
|
UINavigationBarDelegate |
delegate()
Returns the delegate object of the navigation bar.
|
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.
|
boolean |
isTranslucent()
Returns a value that shows whether the navigation bar is translucent or
not.
|
List<UINavigationItem> |
items()
Returns the list of the items of this navigation bar.
|
void |
layoutSubviews()
Changes the layout of this view's subviews.
|
UINavigationItem |
popNavigationItemAnimated(boolean animated)
Pops the item at the top of the stack showing animated the change of the
stack or not according to the given parameter.
|
void |
pushNavigationItem(UINavigationItem item,
boolean animated)
Pushes the given item into this stack.
|
void |
setBarStyle(int UIBarStyle)
Sets the style of the navigation bar as defined by the parameter.
|
void |
setBarTintColor(UIColor tintColor)
Sets the tint color of navigation bar's background.
|
void |
setDelegate(UINavigationBarDelegate delegate)
Sets as the delegate object of this navigation bar the one given.
|
void |
setHidden(boolean hidden)
Sets a Boolean value that defines whether this view is hidden or not.
|
void |
setItems(List<UINavigationItem> items)
The given items replace the items of this navigation bar without
animation on change.
|
void |
setItems(List<UINavigationItem> items,
boolean animated)
The given items replace the original items of this navigation bar either
with animation on change or not according to the given parameter.
|
void |
setTitleTextAttributes(Map<String,Object> titleTextAttributes)
Sets the specified attributes for the bar’s title text.
|
void |
setTranslucent(boolean translucent)
Sets navigation bar state as translucent or not according to the
parameter.
|
Map<String,Object> |
titleTextAttributes()
Returns the attributes of the bar's title text.
|
UINavigationItem |
topItem()
Returns the top item at the list of the navigation bar
|
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, didAddSubview, didMoveToSuperview, didMoveToWindow, 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, setBackgroundColor, setBounds, setCenter, setClearsContextBeforeDrawing, setClipsToBounds, setContentCompressionResistancePriority, setContentHuggingPriority, setContentMode, setFrame, setGestureRecognizers, 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, touchesBegan, touchesCancelled, touchesEnded, touchesMoved
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public UINavigationBar()
public UINavigationBar(CGRect rect)
rect
- CGRect that defines dimension and position of UINavigationBarpublic void pushNavigationItem(UINavigationItem item, boolean animated)
item
- The item to be pushed in the stack.animated
- Boolean defining whether there will be animated change of
the bar after the insertion of the item in the stack.public UINavigationItem popNavigationItemAnimated(boolean animated)
animated
- A Boolean that defines whether the pop change of the
stack is animated.public void setItems(List<UINavigationItem> items)
items
- The times to replace the original items of the navigation
bar.public void setItems(List<UINavigationItem> items, boolean animated)
items
- The items to replace the original in this navigation bar.animated
- A Boolean that defines whether the change of items is
animated or not.public UINavigationBarDelegate delegate()
public void setDelegate(UINavigationBarDelegate delegate)
delegate
- The delegate object of the navigation bar.public UINavigationItem topItem()
public UINavigationItem backItem()
public List<UINavigationItem> items()
public void layoutSubviews()
UIView
layoutSubviews
in class UIView
public int barStyle()
public void setBarStyle(int UIBarStyle)
UIBarStyle
- The parameter that defines the style of the navigation
bar.spublic UIColor barTintColor()
public void setBarTintColor(UIColor tintColor)
tintColor
- The tint color of the navigation bar's background.public boolean isTranslucent()
public void setTitleTextAttributes(Map<String,Object> titleTextAttributes)
titleTextAttributes
- The attributes of the title.public Map<String,Object> titleTextAttributes()
public void setTranslucent(boolean translucent)
translucent
- A Boolean that defines if the navigation bar is
translucent or not.public void setHidden(boolean hidden)
UIView
Copyright © 2020. All rights reserved.