语言

UIView 类

定义

[Foundation.Register("UIView", true)]
public class UIView : UIKit.UIResponder, CoreAnimation.ICALayerDelegate, Foundation.INSCoding, IDisposable, System.Collections.IEnumerable, UIKit.IUIAccessibilityIdentification, UIKit.IUIAppearance, UIKit.IUIAppearanceContainer, UIKit.IUICoordinateSpace, UIKit.IUIDynamicItem, UIKit.IUIFocusItem, UIKit.IUIFocusItemContainer, UIKit.IUILargeContentViewerItem, UIKit.IUIPopoverPresentationControllerSourceItem, UIKit.IUITraitChangeObservable, UIKit.IUITraitEnvironment
[Foundation.Register("UIView", true)]
public class UIView : UIKit.UIResponder, CoreAnimation.ICALayerDelegate, CoreLocation.ICLBodyIdentifiable, CoreMotion.ICMBodyIdentifiable, Foundation.INSCoding, IDisposable, System.Collections.IEnumerable, UIKit.IUIAccessibilityIdentification, UIKit.IUIAppearance, UIKit.IUIAppearanceContainer, UIKit.IUICoordinateSpace, UIKit.IUIDynamicItem, UIKit.IUIFocusItem, UIKit.IUIFocusItemContainer, UIKit.IUILargeContentViewerItem, UIKit.IUIPopoverPresentationControllerSourceItem, UIKit.IUITraitChangeObservable, UIKit.IUITraitEnvironment
[Foundation.Register("UIView", true)]
public class UIView : UIKit.UIResponder, CoreAnimation.ICALayerDelegate, Foundation.INSCoding, IDisposable, System.Collections.IEnumerable, UIKit.IUIAccessibilityIdentification, UIKit.IUIAppearance, UIKit.IUIAppearanceContainer, UIKit.IUICoordinateSpace, UIKit.IUIDynamicItem, UIKit.IUIFocusItem, UIKit.IUIFocusItemContainer, UIKit.IUITraitChangeObservable, UIKit.IUITraitEnvironment
[Foundation.Register("UIView", true)]
public class UIView : UIKit.UIResponder, CoreAnimation.ICALayerDelegate, CoreLocation.ICLBodyIdentifiable, Foundation.INSCoding, IDisposable, System.Collections.IEnumerable, UIKit.IUIAccessibilityIdentification, UIKit.IUIAppearance, UIKit.IUIAppearanceContainer, UIKit.IUICoordinateSpace, UIKit.IUIDynamicItem, UIKit.IUIFocusItem, UIKit.IUIFocusItemContainer, UIKit.IUITraitChangeObservable, UIKit.IUITraitEnvironment
[<Foundation.Register("UIView", true)>]
type UIView = class
    inherit UIResponder
    interface IEnumerable
    interface INSCoding
    interface INativeObject
    interface IDisposable
    interface IUIAccessibilityIdentification
    interface IUIAppearance
    interface IUIAppearanceContainer
    interface IUICoordinateSpace
    interface IUIDynamicItem
    interface IUIFocusEnvironment
    interface IUIFocusItem
    interface IUIFocusItemContainer
    interface IUILargeContentViewerItem
    interface IUIPopoverPresentationControllerSourceItem
    interface IUITraitChangeObservable
    interface IUITraitEnvironment
    interface ICALayerDelegate
[<Foundation.Register("UIView", true)>]
type UIView = class
    inherit UIResponder
    interface IEnumerable
    interface INSCoding
    interface INativeObject
    interface IDisposable
    interface IUIAccessibilityIdentification
    interface IUIAppearance
    interface IUIAppearanceContainer
    interface IUICoordinateSpace
    interface IUIDynamicItem
    interface IUIFocusEnvironment
    interface IUIFocusItem
    interface IUIFocusItemContainer
    interface IUILargeContentViewerItem
    interface IUIPopoverPresentationControllerSourceItem
    interface IUITraitChangeObservable
    interface IUITraitEnvironment
    interface ICALayerDelegate
    interface ICLBodyIdentifiable
    interface ICMBodyIdentifiable
[<Foundation.Register("UIView", true)>]
type UIView = class
    inherit UIResponder
    interface IEnumerable
    interface INSCoding
    interface INativeObject
    interface IDisposable
    interface IUIAccessibilityIdentification
    interface IUIAppearance
    interface IUIAppearanceContainer
    interface IUICoordinateSpace
    interface IUIDynamicItem
    interface IUIFocusEnvironment
    interface IUIFocusItem
    interface IUIFocusItemContainer
    interface IUITraitChangeObservable
    interface IUITraitEnvironment
    interface ICALayerDelegate
[<Foundation.Register("UIView", true)>]
type UIView = class
    inherit UIResponder
    interface IEnumerable
    interface INSCoding
    interface INativeObject
    interface IDisposable
    interface IUIAccessibilityIdentification
    interface IUIAppearance
    interface IUIAppearanceContainer
    interface IUICoordinateSpace
    interface IUIDynamicItem
    interface IUIFocusEnvironment
    interface IUIFocusItem
    interface IUIFocusItemContainer
    interface IUITraitChangeObservable
    interface IUITraitEnvironment
    interface ICALayerDelegate
    interface ICLBodyIdentifiable
继承
派生
特性
实现

构造函数

名称 说明
UIView()

UIView使用默认值创建新项。

UIView(CGRect)
UIView(NativeHandle)

创建非托管对象的托管表示形式时使用的构造函数。 由运行时调用。

UIView(NSCoder)

一个构造函数,用于从存储在 unarchiver 对象中的数据初始化对象。

UIView(NSObjectFlag)

要调用派生类的构造函数,以跳过初始化,并仅分配对象。

属性

名称 说明
AccessibilityActivationPoint
AccessibilityAssistiveTechnologyFocusedIdentifiers (继承自 UIResponder)
AccessibilityAttributedHint
AccessibilityAttributedLabel
AccessibilityAttributedUserInputLabels
AccessibilityAttributedValue
AccessibilityCustomActions (继承自 UIResponder)
AccessibilityDirectTouchOptions
AccessibilityDragSourceDescriptors (继承自 UIResponder)
AccessibilityDropPointDescriptors (继承自 UIResponder)
AccessibilityElementsHidden
AccessibilityExpandedStatus
AccessibilityFrame
AccessibilityHeaderElements
AccessibilityHint
AccessibilityIdentifier

为了辅助功能,唯一标识 this 。

AccessibilityIgnoresInvertColors
AccessibilityLabel
AccessibilityLanguage
AccessibilityNavigationStyle
AccessibilityPath
AccessibilityRespondsToUserInteraction
AccessibilityTextualContext
AccessibilityTraits
AccessibilityUserInputLabels
AccessibilityValue
AccessibilityViewIsModal
ActivityItemsConfiguration (继承自 UIResponder)
AlignmentRectInsets
Alpha
AnchorPoint
AnimationsEnabled
AnnouncementDidFinishNotification

AnnouncementDidFinish 的通知常量

AnnouncementNotification

获取公告需要辅助技术的应用程序发布的通知。

Appearance

返回此类的 UIAppearance 类的强类型属性。

AppliedContentSizeCategoryLimitsDescription
AssistiveTechnologyKey

AssistiveTechnologyKey 的通知常量

AssistiveTouchStatusDidChangeNotification

AssistiveTouchStatusDidChange 的通知常量

AutoresizingMask
AutosizesSubviews
BackgroundColor

用于背景的颜色。

BoldTextStatusDidChangeNotification

BoldTextStatusDidChange 的通知常量

BottomAnchor
Bounds
ButtonShapesEnabledStatusDidChangeNotification

ButtonShapesEnabledStatusDidChange 的通知常量

CanBecomeFirstResponder (继承自 UIResponder)
CanBecomeFocused
CanResignFirstResponder (继承自 UIResponder)
Center
CenterXAnchor
CenterYAnchor
Class (继承自 NSObject)
ClassHandle

此类的 Objective-C 类句柄。

ClearsContextBeforeDrawing
ClipsToBounds
ClosedCaptioningStatusDidChangeNotification

ClosedCaptioningStatusDidChange 的通知常量

CollisionBoundingPath

返回用于碰撞检测的封闭路径。

CollisionBoundsType

返回一个值,该值指示如何指定冲突边界。

Constraints
ContentMode
ContentScaleFactor
ContentStretch
CoordinateSpace

获取坐标空间实现。

CornerConfiguration
DarkerSystemColorsStatusDidChangeNotification

DarkerSystemColorsStatusDidChange 的通知常量

DebugDescription (继承自 NSObject)
Description (继承自 NSObject)
DirectionalLayoutMargins
EditingInteractionConfiguration (继承自 UIResponder)
EffectiveUserInterfaceLayoutDirection
ElementFocusedNotification

ElementFocused 的通知常量

ExclusiveTouch

将事件传送限制为此视图。

FirstBaselineAnchor
Focused

UIView是否为重点视图。

FocusedElementKey

FocusedElementKey 的通知常量

FocusEffect
FocusGroupIdentifier
FocusGroupPriority
FocusItemContainer

获取用于管理子焦点项的焦点信息的容器。

FocusItemDeferralMode
Frame
GestureRecognizers
GrayscaleStatusDidChangeNotification

GrayscaleStatusDidChange 的通知常量

GuidedAccessStatusDidChangeNotification

GuidedAccessStatusDidChange 的通知常量

Handle

处理(指针)到非托管对象表示形式。

(继承自 NSObject)
HasAmbiguousLayout
HearingDevicePairedEarDidChangeNotification

HearingDevicePairedEarDidChange 的通知常量

HeightAnchor
Hidden

指定是否 UIView 显示。

HoverStyle
InheritedAnimationDuration
InputAccessoryView (继承自 UIResponder)
InputAccessoryViewController (继承自 UIResponder)
InputAssistantItem (继承自 UIResponder)
InputView (继承自 UIResponder)
InputViewController (继承自 UIResponder)
InsetsLayoutMarginsFromSafeArea
Interactions
IntrinsicContentSize
InvertColorsStatusDidChangeNotification

InvertColorsStatusDidChange 的通知常量

IsAccessibilityElement
IsDirectBinding

获取或设置一个值,该值指示此实例是否使用直接 Objective-C 绑定。

(继承自 NSObject)
IsFirstResponder (继承自 UIResponder)
IsProxy (继承自 NSObject)
IsTransparentFocusItem
KeyboardLayoutGuide
KeyCommands (继承自 UIResponder)
LargeContentImage
LargeContentImageInsets
LargeContentTitle
LastBaselineAnchor
Layer
LayoutChangedNotification

获取由屏幕布局已更改的应用程序发布的通知。

LayoutGuides
LayoutMargins
LayoutMarginsGuide
LeadingAnchor
LeftAnchor
MaskView
MaximumContentSizeCategory
MinimumContentSizeCategory
MonoAudioStatusDidChangeNotification

MonoAudioStatusDidChange 的通知常量

MotionEffects
MultipleTouchEnabled

控制 UIView 是否可以处理多点触控事件。

NextResponder (继承自 UIResponder)
NoIntrinsicMetric

表示与常量 UIViewNoIntrinsicMetric 关联的值

NotificationSwitchControlIdentifier

NotificationSwitchContr 的通知常量

NotificationVoiceOverIdentifier

NotificationVoiceOv 的通知常量

OnOffSwitchLabelsDidChangeNotification

OnOffSwitchLabelsDidChange 的通知常量

Opaque

确定视图是否不透明。

OverrideUserInterfaceStyle
PageScrolledNotification

获取由滚动操作已完成的应用程序发布的通知。

ParentFocusEnvironment

获取父焦点环境。

PasteConfiguration

对象 UIPasteConfiguration 支持 this 的对象。

(继承自 UIResponder)
PauseAssistiveTechnologyNotification

暂停辅助技术通知。

PreferredFocusedView

如果不是 null,则表示应默认接收焦点的子级 UIView 。

PreferredFocusEnvironments

获取按优先级排序的焦点环境列表,环境在更新焦点时首选。

PrefersCrossFadeTransitionsStatusDidChangeNotification

PrefersCrossFadeTransitionsStatusDidChange 的通知常量

PreservesSuperviewLayoutMargins
ReadableContentGuide
ReduceMotionStatusDidChangeNotification

ReduceMotionStatusDidChange 的通知常量

ReduceTransparencyStatusDidChangeNotification

ReduceTransparencyStatusDidChange 的通知常量

RestorationIdentifier
ResumeAssistiveTechnologyNotification

恢复辅助技术通知。

RetainCount (继承自 NSObject)
RightAnchor
SafeAreaInsets
SafeAreaLayoutGuide
ScalesLargeContentImage
ScreenChangedNotification

获取应用程序发布的通知,该应用程序显示一个新视图,其中包含屏幕的主要部分。

Self (继承自 NSObject)
SemanticContentAttribute
ShakeToUndoDidChangeNotification

ShakeToUndoDidChange 的通知常量

ShouldDifferentiateWithoutColorDidChangeNotification

ShouldDifferentiateWithoutColorDidChange 的通知常量

ShouldGroupAccessibilityChildren
ShowsLargeContentViewer
SpeakScreenStatusDidChangeNotification

SpeakScreenStatusDidChange 的通知常量

SpeakSelectionStatusDidChangeNotification

SpeakSelectionStatusDidChange 的通知常量

SpeechAttributeAnnouncementPriority

表示与常量“UIAccessibilitySpeechAttributeAnnouncementPriority”关联的值。

SpeechAttributeIpaNotation

返回辅助功能特性化字符串的 IPA 表示法。

SpeechAttributeLanguage

获取 BCP-47 语言代码。

SpeechAttributePitch

获取从 0.0 到 2.0 的值,该值确定语音字符串的音调。

SpeechAttributePunctuation

获取要解释为 bool 确定字符串中的标点符号是否发音的值。

SpeechAttributeQueueAnnouncement

语音文本中断现有口语内容的选项的键。

SpeechAttributeSpellOut

表示与常量“UIAccessibilitySpeechAttributeSpellOut”关联的值。

Subviews
Superclass (继承自 NSObject)
SuperHandle
已过时.

用于表示此 NSObject基类中方法的句柄。

(继承自 NSObject)
Superview
SwitchControlStatusDidChangeNotification

SwitchControlStatusDidChange 的通知常量

Tag
TextAttributeContext

表示与常量“UIAccessibilityTextAttributeContext”关联的值。

TextAttributeCustom

自定义属性应用于辅助功能文本的选项的键。

TextAttributeHeadingLevel

辅助功能文本标题级别的选项的键。

TextInputContextIdentifier (继承自 UIResponder)
TextInputMode (继承自 UIResponder)
TintAdjustmentMode
TintColor

用于着色的颜色。

TopAnchor
TouchBar (继承自 UIResponder)
TrailingAnchor
TraitAdjustable
已过时.

获取允许通过一系列值连续调整辅助功能元素的特征。

TraitAllowsDirectInteraction
已过时.

获取允许用户直接触摸交互的特征。

TraitButton
已过时.

获取一个特征,指示应将 thisIUIAccessibilityIdentification 元素视为按钮。

TraitCausesPageTurn
已过时.

获取一个特征,指示当 VoiceOver 完成该页时, thisIUIAccessibilityIdentification 元素应打开页面。

TraitCollection

获取描述环境的特征集合。

TraitHeader
已过时.

获取一个特征,指示 thisIUIAccessibilityIdentification 元素是将内容划分为节的标头。

TraitImage
已过时.

获取指示应将元素视为图像的特征 thisIUIAccessibilityIdentification 。

TraitKeyboardKey
已过时.

获取一个特征,指示 thisIUIAccessibilityIdentification 该元素的行为类似于键盘键。

TraitLink
已过时.

获取指示应将元素视为链接的特征 thisIUIAccessibilityIdentification 。

TraitNone
已过时.

获取指示元素没有特征的特征 thisIUIAccessibilityIdentification 。

TraitNotEnabled
已过时.

获取指示未启用元素的特征 thisIUIAccessibilityIdentification 。

TraitOverrides
TraitPlaysSound
已过时.

获取一个特征,指示 thisIUIAccessibilityIdentification 元素在激活时播放自己的声音。

TraitSearchField
已过时.

获取一个特征,指示应将 thisIUIAccessibilityIdentification 元素视为搜索字段。

TraitSelected
已过时.

获取一个特征,指示已选择该 thisIUIAccessibilityIdentification 元素。

TraitStartsMediaSession
已过时.

获取一个特征,指示 thisIUIAccessibilityIdentification 元素在激活媒体会话时启动它。

TraitStaticText
已过时.

获取一个特征,指示 thisIUIAccessibilityIdentification 应将元素视为静态文本。

TraitSummaryElement
已过时.

获取在应用程序启动时提供摘要信息的特征。

TraitTabBar
已过时.

表示与常量“UIAccessibilityTraitTabBar”关联的值。

TraitUpdatesFrequently
已过时.

获取一个特征,指示 thisIUIAccessibilityIdentification 元素更新其 AccessibilityLabel 或 AccessibilityValue。

Transform
Transform3D
TranslatesAutoresizingMaskIntoConstraints
UILayoutFittingCompressedSize

表示与常量 UILayoutFittingCompressedSize 关联的值

UILayoutFittingExpandedSize

表示与常量 UILayoutFittingExpandedSize 关联的值

UndoManager (继承自 UIResponder)
UnfocusedElementKey

UnfocusedElementKey 的通知常量

UserActivity (继承自 UIResponder)
UserInteractionEnabled

确定此视图是否处理输入事件。

VideoAutoplayStatusDidChangeNotification

VideoAutoplayStatusDidChange 的通知常量

ViewForBaselineLayout
ViewForFirstBaselineLayout
ViewForLastBaselineLayout
ViewPrintFormatter
VoiceOverStatusChanged

开发人员不应使用此已弃用的属性。 开发人员应改用“VoiceOverStatusDidChangeNotification”。

VoiceOverStatusDidChangeNotification

VoiceOverStatusDidChange 的通知常量

WidthAnchor
Window
Zone (继承自 NSObject)

方法

名称 说明
AccessibilityActivate()
AccessibilityDecrement() (继承自 UIResponder)
AccessibilityElementDidBecomeFocused() (继承自 UIResponder)
AccessibilityElementDidLoseFocus() (继承自 UIResponder)
AccessibilityElementIsFocused() (继承自 UIResponder)
AccessibilityIncrement() (继承自 UIResponder)
AccessibilityPerformEscape() (继承自 UIResponder)
AccessibilityPerformMagicTap() (继承自 UIResponder)
AccessibilityScroll(UIAccessibilityScrollDirection) (继承自 UIResponder)
ActionForLayer(CALayer, String)
Add(UIView)

这是一 AddSubview(UIView)个别名,但使用 Add 模式,因为它允许 C# 3.0 构造在创建对象后添加子视图。

AddConstraint(NSLayoutConstraint)
AddConstraints(NSLayoutConstraint[])
AddGestureRecognizer(UIGestureRecognizer)
AddInteraction(IUIInteraction)
AddKeyframeWithRelativeStartTime(Double, Double, Action)
AddLayoutGuide(UILayoutGuide)
AddMotionEffect(UIMotionEffect)
AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr) (继承自 NSObject)
AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr) (继承自 NSObject)
AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>)

注册对象以使用任意方法在外部观察。

(继承自 NSObject)
AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>)

注册对象以使用任意方法在外部观察。

(继承自 NSObject)
AddSubview(UIView)
AddSubviews(UIView[])

将各种视图添加到 UIView 的便利例程。

AlignCenter(NSObject) (继承自 UIResponder)
AlignJustified(NSObject) (继承自 UIResponder)
AlignLeft(NSObject) (继承自 UIResponder)
AlignmentRectForFrame(CGRect)
AlignRight(NSObject) (继承自 UIResponder)
Animate(Double, Action, Action)

对指定操作中发生的属性更改进行动画处理,并在动画完成时调用完成回调。

Animate(Double, Action)
Animate(Double, Double, UIViewAnimationOptions, Action, Action)

通过指定持续时间、延迟、选项和完成处理程序来调用对一个或多个视图的动画更改。

Animate(Double, NFloat, NFloat, Double, UIViewAnimationOptions, Action, Action<Boolean>)
AnimateAsync(Double, Action)

对指定 animation 为异步操作中发生的属性更改进行动画处理。

AnimateAsync(Double, NFloat, NFloat, Double, UIViewAnimationOptions, Action)
AnimateKeyframes(Double, Double, UIViewKeyframeAnimationOptions, Action, UICompletionHandler)
AnimateKeyframesAsync(Double, Double, UIViewKeyframeAnimationOptions, Action)

创建一个动画操作对象,该对象用于为当前视图设置基于帧的关键动画。

AnimateNotify(Double, Action, UICompletionHandler)
AnimateNotify(Double, Double, NFloat, NFloat, UIViewAnimationOptions, Action, UICompletionHandler)

执行一个视图动画,该动画使用与物理春天的活动相对应的计时曲线。

AnimateNotify(Double, Double, UIViewAnimationOptions, Action, UICompletionHandler)
AnimateNotifyAsync(Double, Action)

对指定操作中发生的属性更改进行动画处理,并在动画完成时调用完成回调。

AnimateNotifyAsync(Double, Double, NFloat, NFloat, UIViewAnimationOptions, Action)

执行一个视图动画,该动画使用与物理春天的活动相对应的计时曲线。

AnimateNotifyAsync(Double, Double, UIViewAnimationOptions, Action)

执行指定 animation 为异步操作。

AppearanceWhenContainedIn(Type[])

当视图托管在指定的层次结构中时,返回此类实例的强类型 UIAppearance 。

AwakeFromNib() (继承自 NSObject)
BecomeFirstResponder() (继承自 UIResponder)
BeginAnimations(String, IntPtr)
BeginAnimations(String)

指示动画块的开头。

BeginInvokeOnMainThread(Action)

在主 UI 线程上异步调用指定的操作。

(继承自 NSObject)
BeginInvokeOnMainThread(Selector, NSObject)

在主 UI 线程上异步调用指定的代码。

(继承自 NSObject)
BringSubviewToFront(UIView)
BuildMenu(IUIMenuBuilder) (继承自 UIResponder)
CanPaste(NSItemProvider[])

如果响应者可以从指定的项提供程序粘贴,则返回 true 。

(继承自 UIResponder)
CanPerform(Selector, NSObject) (继承自 UIResponder)
Capture(Boolean)

执行屏幕 UIView捕获 。

CaptureTextFromCamera(NSObject) (继承自 UIResponder)
CommitAnimations()
ConformsToProtocol(NativeHandle) (继承自 NSObject)
ContentCompressionResistancePriority(UILayoutConstraintAxis)
ContentHuggingPriority(UILayoutConstraintAxis)
ConvertPointFromCoordinateSpace(CGPoint, IUICoordinateSpace)
ConvertPointFromView(CGPoint, UIView)
ConvertPointToCoordinateSpace(CGPoint, IUICoordinateSpace)
ConvertPointToView(CGPoint, UIView)
ConvertRectFromCoordinateSpace(CGRect, IUICoordinateSpace)
ConvertRectFromView(CGRect, UIView)
ConvertRectToCoordinateSpace(CGRect, IUICoordinateSpace)
ConvertRectToView(CGRect, UIView)
Copy() (继承自 NSObject)
Copy(NSObject) (继承自 UIResponder)
CreateTouchBar() (继承自 UIResponder)
Cut(NSObject) (继承自 UIResponder)
DangerousAutorelease()

对此对象调用“autorelease”选择器。

(继承自 NSObject)
DangerousRelease()

对此对象调用“release”选择器。

(继承自 NSObject)
DangerousRetain()

对此对象调用“保留”选择器。

(继承自 NSObject)
DecodeRestorableState(NSCoder)
DecreaseSize(NSObject) (继承自 UIResponder)
Delete(NSObject) (继承自 UIResponder)
DidChange(NSKeyValueChange, NSIndexSet, NSString) (继承自 NSObject)
DidChange(NSString, NSKeyValueSetMutationKind, NSSet) (继承自 NSObject)
DidChangeValue(String) (继承自 NSObject)
DidHintFocusMovement(UIFocusMovementHint)

当焦点更改可能很快发生时调用。

DidUpdateFocus(UIFocusUpdateContext, UIFocusAnimationCoordinator)

焦点更改为新的 UIView委托方法后不久调用。

DisplayLayer(CALayer)
Dispose()

释放对象使用 NSObject 的资源。

(继承自 NSObject)
Dispose(Boolean)

释放此对象使用的资源。

DoesNotRecognizeSelector(Selector) (继承自 NSObject)
Draw(CGRect)
DrawLayer(CALayer, CGContext)
DrawRect(CGRect, UIViewPrintFormatter)
DrawViewHierarchy(CGRect, Boolean)
Duplicate(NSObject) (继承自 UIResponder)
EncodeRestorableState(NSCoder)
EncodeTo(NSCoder)

使用提供的编码器对对象的状态进行编码。

Equals(NSObject)

确定指定的 NSObject 值是否等于当前 NSObject。

(继承自 NSObject)
Equals(Object)

确定指定的对象是否等于当前 NSObject对象。

(继承自 NSObject)
ExchangeSubview(IntPtr, IntPtr)

此方法交换数组中UIView两Subviews个 s 的索引。

ExerciseAmbiguityInLayout()
Export(NSObject) (继承自 UIResponder)
Find(NSObject) (继承自 UIResponder)
FindAndReplace(NSObject) (继承自 UIResponder)
FindNext(NSObject) (继承自 UIResponder)
FindPrevious(NSObject) (继承自 UIResponder)
FrameForAlignmentRect(CGRect)
GestureRecognizerShouldBegin(UIGestureRecognizer)
GetAppearance(UITraitCollection, Type[])

获取其外观代理UIView.UIViewAppearance。UIView

GetAppearance(UITraitCollection)

获取其外观代理UIView.UIViewAppearance。UIView

GetAppearance<T>()

获取子类的外观UIView.UIViewAppearance代理UIView。

GetAppearance<T>(UITraitCollection, Type[])

获取子类的外观UIView.UIViewAppearance代理UIView。

GetAppearance<T>(UITraitCollection)

获取子类的外观UIView.UIViewAppearance代理UIView。

GetConstraintsAffectingLayout(UILayoutConstraintAxis)
GetDictionaryOfValuesFromKeys(NSString[]) (继承自 NSObject)
GetDirectionalEdgeInsets(UIViewLayoutRegion)
GetEdgeInsets(UIViewLayoutRegion)
GetEnumerator()

返回一个枚举器,该枚举器列出此视图中的所有子视图

GetFocusItems(CGRect)

返回指定矩形内所有子焦点项的列表。

GetFrame(UIView)
GetHashCode()

为当前实例生成哈希代码。

(继承自 NSObject)
GetLayoutGuide(UIViewLayoutRegion)
GetMethodForSelector(Selector) (继承自 NSObject)
GetNativeHash() (继承自 NSObject)
GetProvider(UIDeferredMenuElement) (继承自 UIResponder)
GetReservedRegions(UIViewReservedRegionKind, UIViewReservedRegionQueryOptions)
GetReservedRegions(UIViewReservedRegionKind)
GetSoundIdentifier(UIFocusUpdateContext)
GetTargetForAction(Selector, NSObject) (继承自 UIResponder)
GetUserInterfaceLayoutDirection(UISemanticContentAttribute, UIUserInterfaceLayoutDirection)
GetUserInterfaceLayoutDirection(UISemanticContentAttribute)
HitTest(CGPoint, UIEvent)
IncreaseSize(NSObject) (继承自 UIResponder)
Init()

通过调用 Objective-C init 方法初始化对象。

(继承自 NSObject)
InitializeHandle(NativeHandle, String, Boolean)

Handle使用本机初始值设定项的结果初始化属性。

(继承自 NSObject)
InitializeHandle(NativeHandle, String) (继承自 NSObject)
InitializeHandle(NativeHandle) (继承自 NSObject)
InsertSubview(UIView, IntPtr)

将指定子视图作为此视图的子视图插入指定位置。

InsertSubviewAbove(UIView, UIView)
InsertSubviewBelow(UIView, UIView)
InvalidateIntrinsicContentSize()
Invoke(Action, Double)

在指定的延迟后调用指定的操作。

(继承自 NSObject)
Invoke(Action, TimeSpan)

在指定的延迟后调用指定的操作。

(继承自 NSObject)
InvokeOnMainThread(Action)

在主 UI 线程上同步调用指定的操作。

(继承自 NSObject)
InvokeOnMainThread(Selector, NSObject)

在主 UI 线程上同步调用指定的代码。

(继承自 NSObject)
IsDescendantOfView(UIView)
IsEqual(NSObject) (继承自 NSObject)
IsKindOfClass(Class) (继承自 NSObject)
IsMemberOfClass(Class) (继承自 NSObject)
LayoutIfNeeded()
LayoutMarginsDidChange()
LayoutSublayersOfLayer(CALayer)
LayoutSubviews()
MakeTextWritingDirectionLeftToRight(NSObject) (继承自 UIResponder)
MakeTextWritingDirectionRightToLeft(NSObject) (继承自 UIResponder)
MarkDirty()

将常规对等对象(IsDirectBinding 为 true)提升为 toggleref 对象。

(继承自 NSObject)
ModifyAnimations(NFloat, Boolean, Action)
MotionBegan(UIEventSubtype, UIEvent) (继承自 UIResponder)
MotionCancelled(UIEventSubtype, UIEvent) (继承自 UIResponder)
MotionEnded(UIEventSubtype, UIEvent) (继承自 UIResponder)
Move(NSObject) (继承自 UIResponder)
MovedToSuperview()
MovedToWindow()
MutableCopy() (继承自 NSObject)
NeedsUpdateConstraints()
NewFromPasteboard(NSObject) (继承自 UIResponder)
ObserveValue(NSString, NSObject, NSDictionary, IntPtr) (继承自 NSObject)
Paste(NSItemProvider[])

执行粘贴。

(继承自 UIResponder)
Paste(NSObject) (继承自 UIResponder)
PasteAndGo(NSObject) (继承自 UIResponder)
PasteAndMatchStyle(NSObject) (继承自 UIResponder)
PasteAndSearch(NSObject) (继承自 UIResponder)
PerformClose(NSObject) (继承自 UIResponder)
PerformSelector(Selector, NSObject, Double, NSString[]) (继承自 NSObject)
PerformSelector(Selector, NSObject, Double) (继承自 NSObject)
PerformSelector(Selector, NSObject, NSObject) (继承自 NSObject)
PerformSelector(Selector, NSObject) (继承自 NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) (继承自 NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean) (继承自 NSObject)
PerformSelector(Selector) (继承自 NSObject)
PerformSystemAnimation(UISystemAnimation, UIView[], UIViewAnimationOptions, Action, UICompletionHandler)
PerformSystemAnimationAsync(UISystemAnimation, UIView[], UIViewAnimationOptions, Action)

对一个或多个视图以及用户定义的并行动画执行指定的系统提供的动画序列。

PerformWithoutAnimation(Action)
PointInside(CGPoint, UIEvent)
PrepareForInterfaceBuilder() (继承自 NSObject)
PressesBegan(NSSet<UIPress>, UIPressesEvent) (继承自 UIResponder)
PressesCancelled(NSSet<UIPress>, UIPressesEvent) (继承自 UIResponder)
PressesChanged(NSSet<UIPress>, UIPressesEvent) (继承自 UIResponder)
PressesEnded(NSSet<UIPress>, UIPressesEvent) (继承自 UIResponder)
Print(NSObject) (继承自 UIResponder)
RegisterForTraitChanges(Action<IUITraitEnvironment,UITraitCollection>, Type[])

注册一个回调处理程序,该处理程序将在指定特征之一发生更改时执行。

RegisterForTraitChanges(Class[], Action<IUITraitEnvironment,UITraitCollection>)
RegisterForTraitChanges(Class[], NSObject, Selector)
RegisterForTraitChanges(Class[], Selector)
RegisterForTraitChanges(IUITraitDefinition[], Action<IUITraitEnvironment,UITraitCollection>)
RegisterForTraitChanges(IUITraitDefinition[], NSObject, Selector)
RegisterForTraitChanges(IUITraitDefinition[], Selector)
RegisterForTraitChanges(Type[], Action<IUITraitEnvironment,UITraitCollection>)

注册一个回调处理程序,该处理程序将在指定特征之一发生更改时执行。

RegisterForTraitChanges(Type[], NSObject, Selector)

注册一个选择器,当任何指定的特征发生更改时,将在指定对象上调用该选择器。

RegisterForTraitChanges(Type[], Selector)

注册一个选择器,当任何指定的特征发生更改时,将在当前对象上调用该选择器。

RegisterForTraitChanges<T>(Action<IUITraitEnvironment,UITraitCollection>)

注册将在指定特征发生更改时执行的回调处理程序。

RegisterForTraitChanges<T1,T2,T3,T4>(Action<IUITraitEnvironment,UITraitCollection>)

注册将在任何指定特征发生更改时执行的回调处理程序。

RegisterForTraitChanges<T1,T2,T3>(Action<IUITraitEnvironment,UITraitCollection>)

注册将在任何指定特征发生更改时执行的回调处理程序。

RegisterForTraitChanges<T1,T2>(Action<IUITraitEnvironment,UITraitCollection>)

注册将在任何指定特征发生更改时执行的回调处理程序。

ReloadInputViews() (继承自 UIResponder)
RemoteControlReceived(UIEvent) (继承自 UIResponder)
RemoveConstraint(NSLayoutConstraint)
RemoveConstraints(NSLayoutConstraint[])
RemoveFromSuperview()
RemoveGestureRecognizer(UIGestureRecognizer)
RemoveInteraction(IUIInteraction)
RemoveLayoutGuide(UILayoutGuide)
RemoveMotionEffect(UIMotionEffect)
RemoveObserver(NSObject, NSString, IntPtr) (继承自 NSObject)
RemoveObserver(NSObject, NSString) (继承自 NSObject)
RemoveObserver(NSObject, String, IntPtr) (继承自 NSObject)
RemoveObserver(NSObject, String) (继承自 NSObject)
Rename(NSObject) (继承自 UIResponder)
RequiresConstraintBasedLayout()
ResignFirstResponder() (继承自 UIResponder)
ResizableSnapshotView(CGRect, Boolean, UIEdgeInsets)
RespondsToSelector(Selector) (继承自 NSObject)
RestoreUserActivityState(NSUserActivity) (继承自 UIResponder)
SafeAreaInsetsDidChange()
Select(NSObject) (继承自 UIResponder)
SelectAll(NSObject) (继承自 UIResponder)
SendSubviewToBack(UIView)
SetAnimationBeginsFromCurrentState(Boolean)
SetAnimationCurve(UIViewAnimationCurve)
SetAnimationDelay(Double)
SetAnimationDelegate(NSObject)
SetAnimationDidStopSelector(Selector)
SetAnimationDuration(Double)
SetAnimationRepeatAutoreverses(Boolean)
SetAnimationRepeatCount(Single)
SetAnimationStartDate(NSDate)
SetAnimationTransition(UIViewAnimationTransition, UIView, Boolean)
SetAnimationWillStartSelector(Selector)
SetContentCompressionResistancePriority(Single, UILayoutConstraintAxis)
SetContentHuggingPriority(Single, UILayoutConstraintAxis)
SetEffectiveRadius(UIRectCorner)
SetNeedsDisplay()
SetNeedsDisplayInRect(CGRect)
SetNeedsFocusUpdate()

当活动焦点环境为活动焦点环境时 this ,请求焦点更新,这可能会更改焦点 PreferredFocusedView。 (另 UpdateFocusIfNeeded()请参阅。)

SetNeedsLayout()
SetNeedsUpdateConstraints()
SetNeedsUpdateProperties()
SetNilValueForKey(NSString) (继承自 NSObject)
SetValueForKey(NSObject, NSString) (继承自 NSObject)
SetValueForKeyPath(NativeHandle, NSString)

将给定键路径标识的属性的值设置为给定值。

(继承自 NSObject)
SetValueForKeyPath(NSObject, NSString) (继承自 NSObject)
SetValueForUndefinedKey(NSObject, NSString) (继承自 NSObject)
SetValuesForKeysWithDictionary(NSDictionary) (继承自 NSObject)
ShouldUpdateFocus(UIFocusUpdateContext)

在当前对象丢失或接收焦点之前调用。 如果任一焦点环境返回 false,则取消焦点更新。

ShowWritingTools(NSObject) (继承自 UIResponder)
SizeThatFits(CGSize)
SizeToFit()
SnapshotView(Boolean)
SubviewAdded(UIView)
SystemLayoutSizeFittingSize(CGSize, Single, Single)
SystemLayoutSizeFittingSize(CGSize)
TintColorDidChange()
ToggleBoldface(NSObject) (继承自 UIResponder)
ToggleInspector(NSObject) (继承自 UIResponder)
ToggleItalics(NSObject) (继承自 UIResponder)
ToggleSidebar(NSObject) (继承自 UIResponder)
ToggleUnderline(NSObject) (继承自 UIResponder)
ToString()

返回当前实例值的字符串表示形式。

(继承自 NSObject)
TouchesBegan(NSSet, UIEvent) (继承自 UIResponder)
TouchesCancelled(NSSet, UIEvent) (继承自 UIResponder)
TouchesEnded(NSSet, UIEvent) (继承自 UIResponder)
TouchesEstimatedPropertiesUpdated(NSSet) (继承自 UIResponder)
TouchesMoved(NSSet, UIEvent) (继承自 UIResponder)
TraitCollectionDidChange(UITraitCollection)

描述环境的特征集合已更改。

Transition(UIView, Double, UIViewAnimationOptions, Action, Action)

指定指定集合视图中的过渡动画。

Transition(UIView, UIView, Double, UIViewAnimationOptions, Action)

指定指定集合视图中的过渡动画。

TransitionNotify(UIView, Double, UIViewAnimationOptions, Action, UICompletionHandler)
TransitionNotify(UIView, UIView, Double, UIViewAnimationOptions, UICompletionHandler)
TransitionNotifyAsync(UIView, Double, UIViewAnimationOptions, Action)

创建用于当前容器视图的过渡动画操作。

TransitionNotifyAsync(UIView, UIView, Double, UIViewAnimationOptions)

指定要在指定 UIViews 之间使用的过渡动画。

UnregisterForTraitChanges(IUITraitChangeRegistration)
UpdateConstraints()
UpdateConstraintsIfNeeded()
UpdateFocusIfNeeded()

如果任何焦点环境有挂起的更新,此方法将强制立即进行焦点更新。 与此方法不同 SetNeedsFocusUpdate(),此方法可能由任何 IUIFocusEnvironment方法调用,无论它当前是否包含焦点。

UpdateProperties()
UpdatePropertiesIfNeeded()
UpdateTextAttributes(UITextAttributesConversionHandler) (继承自 UIResponder)
UpdateTraitsIfNeeded()
UpdateUserActivityState(NSUserActivity) (继承自 UIResponder)
UseSelectionForFind(NSObject) (继承自 UIResponder)
ValidateCommand(UICommand) (继承自 UIResponder)
ValueForKey(NSString) (继承自 NSObject)
ValueForKeyPath(NSString) (继承自 NSObject)
ValueForUndefinedKey(NSString) (继承自 NSObject)
ViewWithTag(IntPtr)

返回 UIView 由 tag.. 可以返回 null。

WillChange(NSKeyValueChange, NSIndexSet, NSString) (继承自 NSObject)
WillChange(NSString, NSKeyValueSetMutationKind, NSSet) (继承自 NSObject)
WillChangeValue(String) (继承自 NSObject)
WillDrawLayer(CALayer)

即将绘制时 layer 调用的方法。

WillMoveToSuperview(UIView)
WillMoveToWindow(UIWindow)
WillRemoveSubview(UIView)

事件

名称 说明
AnimationWillEnd

当动画结束时,将引发此事件。

AnimationWillStart

当动画开始时,将引发此事件。

扩展方法

名称 说明
AccessibilityHitTest(NSObject, CGPoint, UIEvent)
ActionForLayer(ICALayerDelegate, CALayer, String)
AlignCenter(IUIResponderStandardEditActions, NSObject)
AlignJustified(IUIResponderStandardEditActions, NSObject)
AlignLeft(IUIResponderStandardEditActions, NSObject)
AlignRight(IUIResponderStandardEditActions, NSObject)
BrowserAccessibilityDeleteTextAtCursor(NSObject, IntPtr)
BrowserAccessibilityInsertTextAtCursor(NSObject, String)
CanPaste(IUIPasteConfigurationSupporting, NSItemProvider[])

如果响应者可以从指定的项提供程序粘贴,则返回 true 。

Copy(IUIResponderStandardEditActions, NSObject)
Cut(IUIResponderStandardEditActions, NSObject)
DecreaseSize(IUIResponderStandardEditActions, NSObject)
Delete(IUIResponderStandardEditActions, NSObject)
DidHintFocusMovement(IUIFocusItem, UIFocusMovementHint)

当焦点更改可能很快发生时调用。

DisplayLayer(ICALayerDelegate, CALayer)
DrawLayer(ICALayerDelegate, CALayer, CGContext)
Duplicate(IUIResponderStandardEditActions, NSObject)
EndEditing(UIView, Boolean)
Export(IUIResponderStandardEditActions, NSObject)
Find(IUIResponderStandardEditActions, NSObject)
FindAndReplace(IUIResponderStandardEditActions, NSObject)
FindNext(IUIResponderStandardEditActions, NSObject)
FindPrevious(IUIResponderStandardEditActions, NSObject)
GetAccessibilityCustomRotors(NSObject)

获取适合UIAccessibilityCustomRotor对象的对象的数组this。

GetAccessibilityLineEndPositionFromCurrentSelection(NSObject)
GetAccessibilityLineRangeForPosition(NSObject, IntPtr)
GetAccessibilityLineStartPositionFromCurrentSelection(NSObject)
GetAccessibilityNextTextNavigationElement(NSObject)
GetAccessibilityNextTextNavigationElementBlock(NSObject)
GetAccessibilityPreviousTextNavigationElement(NSObject)
GetAccessibilityPreviousTextNavigationElementBlock(NSObject)
GetAccessibilityTextInputResponder(NSObject)
GetAccessibilityTextInputResponderHandler(NSObject)
GetBrowserAccessibilityAttributedValue(NSObject, NSRange)
GetBrowserAccessibilityContainerType(NSObject)
GetBrowserAccessibilityCurrentStatus(NSObject)
GetBrowserAccessibilityDetailsElements(NSObject)
GetBrowserAccessibilityHasDomFocus(NSObject)
GetBrowserAccessibilityImageData(NSObject, NSDictionary)
GetBrowserAccessibilityImageDataSize(NSObject)
GetBrowserAccessibilityIsRequired(NSObject)
GetBrowserAccessibilityKeyboardShortcuts(NSObject)
GetBrowserAccessibilityOrientation(NSObject)
GetBrowserAccessibilityPressedState(NSObject)
GetBrowserAccessibilityRoleDescription(NSObject)
GetBrowserAccessibilitySelectedTextRange(NSObject)
GetBrowserAccessibilitySortDirection(NSObject)
GetBrowserAccessibilityValue(NSObject, NSRange)
GetCollisionBoundingPath(IUIDynamicItem)

返回用于碰撞检测的封闭路径。

GetCollisionBoundsType(IUIDynamicItem)

返回一个值,该值指示如何指定冲突边界。

GetDebugDescription(INSObjectProtocol)
GetFocusEffect(IUIFocusItem)
GetFocusGroupIdentifier(IUIFocusEnvironment)
GetFocusGroupPriority(IUIFocusItem)
GetFocusItemDeferralMode(IUIFocusItem)
GetFrame(IUIPopoverPresentationControllerSourceItem, UIView)
GetHandle(INativeObject)
GetIsTransparentFocusItem(IUIFocusItem)
GetNonNullHandle(INativeObject, String)
GetPencilKitResponderState(UIResponder)
GetPreferredFocusedView(IUIFocusEnvironment)

如果不是 null,则表示应默认接收焦点的子级 UIView 。

GetSoundIdentifier(IUIFocusEnvironment, UIFocusUpdateContext)
IncreaseSize(IUIResponderStandardEditActions, NSObject)
LayoutSublayersOfLayer(ICALayerDelegate, CALayer)
MakeTextWritingDirectionLeftToRight(IUIResponderStandardEditActions, NSObject)
MakeTextWritingDirectionRightToLeft(IUIResponderStandardEditActions, NSObject)
Move(IUIResponderStandardEditActions, NSObject)
NewFromPasteboard(IUIResponderStandardEditActions, NSObject)
Paste(IUIPasteConfigurationSupporting, NSItemProvider[])

执行粘贴。

Paste(IUIResponderStandardEditActions, NSObject)
PasteAndGo(IUIResponderStandardEditActions, NSObject)
PasteAndMatchStyle(IUIResponderStandardEditActions, NSObject)
PasteAndSearch(IUIResponderStandardEditActions, NSObject)
PerformClose(IUIResponderStandardEditActions, NSObject)
Print(IUIResponderStandardEditActions, NSObject)
ProvideImageData(NSObject, IntPtr, UIntPtr, UIntPtr, UIntPtr, UIntPtr, UIntPtr, NSObject)
ProvideImageToMTLTexture(NSObject, IMTLTexture, IMTLCommandBuffer, UIntPtr, UIntPtr, UIntPtr, UIntPtr, NSObject)
RegisterForTraitChanges(IUITraitChangeObservable, Class[], Action<IUITraitEnvironment,UITraitCollection>)
RegisterForTraitChanges(IUITraitChangeObservable, Class[], NSObject, Selector)
RegisterForTraitChanges(IUITraitChangeObservable, Class[], Selector)
RegisterForTraitChanges(IUITraitChangeObservable, IUITraitDefinition[], Action<IUITraitEnvironment,UITraitCollection>)
RegisterForTraitChanges(IUITraitChangeObservable, IUITraitDefinition[], NSObject, Selector)
RegisterForTraitChanges(IUITraitChangeObservable, IUITraitDefinition[], Selector)
Rename(IUIResponderStandardEditActions, NSObject)
Select(IUIResponderStandardEditActions, NSObject)
SelectAll(IUIResponderStandardEditActions, NSObject)
SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[])

设置适合UIAccessibilityCustomRotor对象的对象的数组this。

SetAccessibilityNextTextNavigationElement(NSObject, NSObject)
SetAccessibilityNextTextNavigationElementBlock(NSObject, AXObjectReturnBlock)
SetAccessibilityPreviousTextNavigationElement(NSObject, NSObject)
SetAccessibilityPreviousTextNavigationElementBlock(NSObject, AXObjectReturnBlock)
SetAccessibilityTextInputResponder(NSObject, IUITextInput)
SetAccessibilityTextInputResponderHandler(NSObject, UITextInputReturnHandler)
SetBrowserAccessibilityContainerType(NSObject, BEAccessibilityContainerType)
SetBrowserAccessibilityCurrentStatus(NSObject, String)
SetBrowserAccessibilityDetailsElements(NSObject, NSObject[])
SetBrowserAccessibilityHasDomFocus(NSObject, Boolean)
SetBrowserAccessibilityIsRequired(NSObject, Boolean)
SetBrowserAccessibilityKeyboardShortcuts(NSObject, String)
SetBrowserAccessibilityOrientation(NSObject, BEAccessibilityOrientation)
SetBrowserAccessibilityPressedState(NSObject, BEAccessibilityPressedState)
SetBrowserAccessibilityRoleDescription(NSObject, String)
SetBrowserAccessibilitySelectedTextRange(NSObject, NSRange)
SetBrowserAccessibilitySortDirection(NSObject, String)
SetSharedObservers(NSObject, NSKeyValueSharedObserversSnapshot)
ShowWritingTools(IUIResponderStandardEditActions, NSObject)
ToggleBoldface(IUIResponderStandardEditActions, NSObject)
ToggleInspector(IUIResponderStandardEditActions, NSObject)
ToggleItalics(IUIResponderStandardEditActions, NSObject)
ToggleSidebar(IUIResponderStandardEditActions, NSObject)
ToggleUnderline(IUIResponderStandardEditActions, NSObject)
UpdateTextAttributes(IUIResponderStandardEditActions, UITextAttributesConversionHandler)
UseSelectionForFind(IUIResponderStandardEditActions, NSObject)
WillDrawLayer(ICALayerDelegate, CALayer)

即将绘制时 layer 调用的方法。

适用于