UIView.ViewWithTag(nint) Method

Definition

Returns the UIView identified by the tag. May return null.

[Foundation.Export("viewWithTag:")]
public virtual UIKit.UIView ViewWithTag (nint tag);
abstract member ViewWithTag : nint -> UIKit.UIView
override this.ViewWithTag : nint -> UIKit.UIView

Parameters

tag
System.System.IntPtr System.nativeint

The identifier being searched for.

Returns

The view in the view hierarchy whose Tag is equal to tag.

Attributes

Remarks

This method searches the current UIView's view hierarchy (i.e., this, its Subviews and their descendants) and returns the UIView, if any, whose Tag property is equal to the tag parameter. If no such UIView exists, this method returns null.

Applies to

See also