UIView Flashcards

1
Q

init(frame: CGRect)

A

Initializes and returns a newly allocated view object with the specified frame rectangle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

var backgroundColor: UIColor?

A

The view’s background color.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

var IsHidden: Bool

A

A Boolean value that determines whether the view is hidden.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

var alpha: CGFloat

A

The view’s alpha value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

var IsOpaque: Bool

A

A Boolean value that determines whether the view is opaque.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

var TintColor: UIColor!

A

The first nondefault tint color value in the view’s hierarchy, ascending from and starting with the view itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

var tintAdjustmentMode: UIView.TintAdjustmentMode

A

The first non-default tint adjustment mode value in the view’s hierarchy, ascending from and starting with the view itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

var clipsToBounds: Bool

A

A Boolean value that determines whether subviews are confined to the bounds of the view.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

var clearsContextBeforeDrawing: Bool

A

A Boolean value that determines whether the view’s bounds should be automatically cleared before drawing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

var mask: UIView?

A

An optional view whose alpha channel is used to mask a view’s content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

class var layerClass: AnyClass

A

Returns the class used to create the layer for instances of this class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

var layer: CALayer

A

The view’s Core Animation layer used for rendering.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

var isUserInteractionEnabled: Bool

A

A Boolean value that determines whether user events are ignored and removed from the event queue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

var isMultipleTouchEnabled: Bool

A

A Boolean value that indicates whether the view receives more than one touch at a time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

var isExclusiveTouch: Bool

A

A Boolean value that indicates whether the receiver handles touch events exclusively.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

var frame: CGRect

A

The frame rectangle, which describes the view’s location and size in its superview’s coordinate system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

var bounds: CGRect

A

The bounds rectangle, which describes the view’s location and size in its own coordinate system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

var center: CGPoint

A

The center point of the view’s frame rectangle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

var transform: CGAffineTransform

A

Specifies the transform applied to the view, relative to the center of its bounds.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

var superview: UIView?

A

The receiver’s superview, or nil if it has none.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

var subviews: [UIView]

A

The receiver’s immediate subviews.

22
Q

var window: UIWindow?

A

The receiver’s window object, or nil if it has none.

23
Q

func addSubview(UIView)

A

Adds a view to the end of the receiver’s list of subviews.

24
Q

func bringSubViewToFront (UIView)

A

Moves the specified subview so that it appears on top of its siblings.

25
Q

func sendSubviewToBack (UIView)

A

Moves the specified subview so that it appears behind its siblings.

26
Q

func removeFromSuperview()

A

Unlinks the view from its superview and its window, and removes it from the responder chain.

27
Q

func insertSubView(UIView, at: Int)

A

Inserts a subview at the specified index.

28
Q

func insertSubView(UIView, above Subview: UIView)

A

Inserts a view above another view in the view hierarchy.

29
Q

func insertSubview(UIView, below Subview: UIView)

A

Inserts a view below another view in the view hierarchy.

30
Q

func exchangeSubview(at: Int, with SubviewAt: Int)

A

Exchanges the subviews at the specified indices.

31
Q

func isDescendant(of: UIView) -> Bool

A

Returns a Boolean value indicating whether the receiver is a subview of a given view or identical to that view.

32
Q

func didAddSubview(UIView)

A

Tells the view that a subview was added.

33
Q

func willRemoveSubview(UIView)

A

Tells the view that a subview is about to be removed.

34
Q

func willMove(toSuperview: UIView?)

A

Tells the view that its superview is about to change to the specified superview.

35
Q

func didMoveToSuperView()

A

Tells the view that its superview changed.

36
Q

func willMove(toWindow: UIWindow?)

A

Tells the view that its window object is about to change.

37
Q

func didMoveToWindow()

A

Tells the view that its window object changed.

38
Q

var directionalLayoutMargins: NSDirectionalEdgeInsets

A

The default spacing to use when laying out content in a view, taking into account the current language direction.

39
Q

var layoutMargins: UIEdgeInsets

A

The default spacing to use when laying out content in the view.

40
Q

var preserveSuperviewLayoutMargins: Bool

A

A Boolean value indicating whether the current view also respects the margins of its superview.

41
Q

func layoutMarginsDidChange()

A

Notifies the view that the layout margins changed.

42
Q

var safeAreaInsets: UIEdgeInsets

A

The insets that you use to determine the safe area for this view.

43
Q

var safeAreaLayoutGuide: UILayout Guide

A

The layout guide representing the portion of your view that is unobscured by bars and other content.

44
Q

func safeAreaInsetsDidChange()

A

Called when the safe area of the view changes.

45
Q

var insetsLayoutMarginsFromSafeArea: Bool

A

A Boolean value indicating whether the view’s layout margins are updated automatically to reflect the safe area.

46
Q

var constraints: [NSLayout Constraint]

A

The constraints held by the view.

47
Q

func addConstraint (NSLayout Constraint)

A

Adds a constraint on the layout of the receiving view or its subviews.

48
Q

func addConstraints([NSLayout Constraint])

A

Adds multiple constraints on the layout of the receiving view or its subviews.

49
Q

func removeConstraint(NSLayout Constraint)

A

Removes the specified constraint from the view.

50
Q

func removeConstraints([NSLayout Constraints])

A

Removes the specified constraints from the view.