public class UITextView extends UIView
NoIntrinsicMetric
Constructor and Description |
---|
UITextView()
Constructs a default UITextView object located at (0,0) with 0 weight and
0 height.
|
UITextView(CGRect rect)
Constructs a UITextView object initialized with the dimensions and
position specified in the rect parameter.
|
Modifier and Type | Method and Description |
---|---|
int |
autocapitalizationType()
Returns the auto-capitalization style that is applied to the text view.
|
int |
autocorrectionType()
Returns the auto-correction style of the text view.
|
boolean |
becomeFirstResponder()
Returns a Boolean that shows whether this UIResponder accepts to change
its status to first responder.
|
long |
dataDetectorTypes()
Returns the types of data that are viewed as clickable URLs in the text
view content.
|
UITextViewDelegate |
delegate()
Returns the delegate of the receiver.
|
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 |
enablesReturnKeyAutomatically()
Returns a Boolean that shows whether the return key of the text view is
automatically enabled or not.
|
UIFont |
font()
Returns the font of text view content.
|
boolean |
isEditable()
Returns a Boolean value that shows whether the text view is editable or
not.
|
boolean |
isSecureTextEntry()
Returns a Boolean that show whether the text view hides or not the text
that is being entered.
|
int |
keyboardAppearance()
Returns an integer that represents keyboard style used by the text view.
|
int |
keyboardType()
Returns the keyboard style of the text view.
|
boolean |
resignFirstResponder()
Returns a Boolean that shows whether this UIResponder accepts to resign
its status as first responder.
|
int |
returnKeyType()
Returns an integer that corresponds to the text on the return key.
|
void |
setAutocapitalizationType(int UITextAutocapitalizationType)
Sets the auto-capitalization style for the text view.
|
void |
setAutocorrectionType(int UITextAutocorrectionType)
Sets the auto-correction style for the text view.
|
void |
setBackgroundColor(UIColor background)
Set this view's background color.
|
void |
setDataDetectorTypes(long dataDetectorTypes)
Sets the types of data that will be viewed as clickable URLs in the text
view content.
|
void |
setDelegate(UITextViewDelegate delegate)
Sets the receiver's delegate.
|
void |
setEditable(boolean editable)
Sets a Boolean value that defines whether the text view is editable or
not.
|
void |
setEnablesReturnKeyAutomatically(boolean enablesReturnKeyAutomatically)
Sets a Boolean that defines whether the return key of the text view is
automatically enabled or not.
|
void |
setFont(UIFont font)
Sets the font of the text view content.
|
void |
setKeyboardAppearance(int UIKeyboardAppearance)
Sets the appearance of the keyboard that is used by the text view.
|
void |
setKeyboardType(int UIKeyboardType)
Sets the keyboard style for the text view.
|
void |
setReturnKeyType(int UIReturnKeyType)
Sets the text that is displayed on the return key.
|
void |
setSecureTextEntry(boolean secureTextEntry)
Sets a Boolean value that defines whether the text view hides the text
that is entered.
|
void |
setText(String txt)
Sets the text of the text view.
|
void |
setTextAlignment(int UITextAlignment)
Sets the text alignment for the content of the text view.
|
void |
setTextColor(UIColor color)
Sets the color of the text view.
|
void |
setTextContainerInset(UIEdgeInsets textContainerInset)
Sets the insets of the text view container.
|
String |
text()
Returns the text that is displayed on the text view.
|
int |
textAlignment()
Returns the text alignment that is used for the content of the text view.
|
UIColor |
textColor()
Returns the color of the text view.
|
UIEdgeInsets |
textContainerInset()
Returns the insets of the text view container.
|
void |
touchesBegan(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers touched the screen.
|
void |
touchesCancelled(Set<UITouch> touches,
UIEvent event)
Sent to this responder when touch event has been canceled.
|
void |
touchesEnded(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers were lifted from the
screen.
|
void |
touchesMoved(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers move on the screen.
|
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, 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, 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
isFirstResponder
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public UITextView()
public UITextView(CGRect rect)
rect
- CGRect that defines dimension and position of the UITextView.public String text()
public void setText(String txt)
txt
- The text displayed on the text view.public UIEdgeInsets textContainerInset()
UIEdgeInsets
public void setTextContainerInset(UIEdgeInsets textContainerInset)
textContainerInset
- The insets of the text view container.UIEdgeInsets
public UIFont font()
UIFont
public void setFont(UIFont font)
font
- The font of the text view content.UIFont
public UIColor textColor()
UIColor
public void setTextColor(UIColor color)
color
- The color of the text view.public int textAlignment()
UITextAlignment
public void setTextAlignment(int UITextAlignment)
UITextAlignment
- The text alignment of the content of the text
view.UITextAlignment
public int autocapitalizationType()
UITextAutocapitalizationType
public void setAutocapitalizationType(int UITextAutocapitalizationType)
UITextAutocapitalizationType
- The auto-capitalization style for the
text view.UITextAutocapitalizationType
public int autocorrectionType()
UITextAutocorrectionType
public void setAutocorrectionType(int UITextAutocorrectionType)
UITextAutocorrectionType
- The auto-correction style for the text
view.UITextAutocorrectionType
public int keyboardType()
UIKeyboardType
public void setKeyboardType(int UIKeyboardType)
UIKeyboardType
- The keyboard style for the text view.UIKeyboardType
public boolean enablesReturnKeyAutomatically()
public void setEnablesReturnKeyAutomatically(boolean enablesReturnKeyAutomatically)
enablesReturnKeyAutomatically
- A Boolean that defines whether the
return key of the text view is automatically enabled or not.public int keyboardAppearance()
UIKeyboardAppearance
public void setKeyboardAppearance(int UIKeyboardAppearance)
UIKeyboardAppearance
- The appearance style of the keyboard that is
used by the text view.UIKeyboardAppearance
public int returnKeyType()
UIReturnKeyType
public void setReturnKeyType(int UIReturnKeyType)
UIReturnKeyType
- The text displaye on the return key.UIReturnKeyType
public boolean isSecureTextEntry()
public void setSecureTextEntry(boolean secureTextEntry)
secureTextEntry
- A Boolean value that defines whether the text view
hides the text that is entered.public boolean isEditable()
public void setEditable(boolean editable)
editable
- A Boolean that defines whether the text view is editable
or not.public void setBackgroundColor(UIColor background)
UIView
setBackgroundColor
in class UIView
background
- The view’s background color.public void setDelegate(UITextViewDelegate delegate)
delegate
- The receiver’s delegate.public UITextViewDelegate delegate()
public long dataDetectorTypes()
public void setDataDetectorTypes(long dataDetectorTypes)
dataDetectorTypes
- The types of data that will be viewed as
clickable URLs.public boolean resignFirstResponder()
UIResponder
resignFirstResponder
in class UIResponder
public boolean becomeFirstResponder()
UIResponder
becomeFirstResponder
in class UIResponder
public void touchesBegan(Set<UITouch> touches, UIEvent event)
UIResponder
touchesBegan
in class UIResponder
touches
- The set touches to which the touch or touches belongs.event
- The event to which the touches belong.public void touchesMoved(Set<UITouch> touches, UIEvent event)
UIResponder
touchesMoved
in class UIResponder
touches
- The set touches to which the touch or touches belongs.event
- The event to which the touches belong.public void touchesEnded(Set<UITouch> touches, UIEvent event)
UIResponder
touchesEnded
in class UIResponder
touches
- The set touches to which the touch or touches belongs.event
- The event to which the touches belong.public void touchesCancelled(Set<UITouch> touches, UIEvent event)
UIResponder
touchesCancelled
in class UIResponder
touches
- The set touches to which the touch belongs.event
- The event to which the touches belong.Copyright © 2020. All rights reserved.