UIView Flashcards

(50 cards)

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
func sendSubviewToBack (UIView)
Moves the specified subview so that it appears behind its siblings.
26
func removeFromSuperview()
Unlinks the view from its superview and its window, and removes it from the responder chain.
27
func insertSubView(UIView, at: Int)
Inserts a subview at the specified index.
28
func insertSubView(UIView, above Subview: UIView)
Inserts a view above another view in the view hierarchy.
29
func insertSubview(UIView, below Subview: UIView)
Inserts a view below another view in the view hierarchy.
30
func exchangeSubview(at: Int, with SubviewAt: Int)
Exchanges the subviews at the specified indices.
31
func isDescendant(of: UIView) -> Bool
Returns a Boolean value indicating whether the receiver is a subview of a given view or identical to that view.
32
func didAddSubview(UIView)
Tells the view that a subview was added.
33
func willRemoveSubview(UIView)
Tells the view that a subview is about to be removed.
34
func willMove(toSuperview: UIView?)
Tells the view that its superview is about to change to the specified superview.
35
func didMoveToSuperView()
Tells the view that its superview changed.
36
func willMove(toWindow: UIWindow?)
Tells the view that its window object is about to change.
37
func didMoveToWindow()
Tells the view that its window object changed.
38
var directionalLayoutMargins: NSDirectionalEdgeInsets
The default spacing to use when laying out content in a view, taking into account the current language direction.
39
var layoutMargins: UIEdgeInsets
The default spacing to use when laying out content in the view.
40
var preserveSuperviewLayoutMargins: Bool
A Boolean value indicating whether the current view also respects the margins of its superview.
41
func layoutMarginsDidChange()
Notifies the view that the layout margins changed.
42
var safeAreaInsets: UIEdgeInsets
The insets that you use to determine the safe area for this view.
43
var safeAreaLayoutGuide: UILayout Guide
The layout guide representing the portion of your view that is unobscured by bars and other content.
44
func safeAreaInsetsDidChange()
Called when the safe area of the view changes.
45
var insetsLayoutMarginsFromSafeArea: Bool
A Boolean value indicating whether the view's layout margins are updated automatically to reflect the safe area.
46
var constraints: [NSLayout Constraint]
The constraints held by the view.
47
func addConstraint (NSLayout Constraint)
Adds a constraint on the layout of the receiving view or its subviews.
48
func addConstraints([NSLayout Constraint])
Adds multiple constraints on the layout of the receiving view or its subviews.
49
func removeConstraint(NSLayout Constraint)
Removes the specified constraint from the view.
50
func removeConstraints([NSLayout Constraints])
Removes the specified constraints from the view.