for a class or struct to be set once and then be immutable. The boat object has an engine and its cylinder count will be whatever you initialize it to.
CGFloat public var y: CGFloat } CGSize struct CGSize { CGFloat width CGFloat height } CGRect (combines CGPoint and CGSize) struct CGRect { public var origin: CGPoint public var size: CGSize }
CGRect. The difference is that a view’s frame is relative to the superview while a view’s bounds is relative to itself. The origin of a bounds value is always 0,0. A view’s bounds is usually the same as its frame BUT a rotated view will have different sizes for its bounds and frame.
the width + the x-offset maxY - gets the height + the y-offset minX - returns the smallest value for the view’s x-coordinate minY - returns the smallest value for the view’s y-coordinate
correspond to one physical pixel. On a device with a retina screen, a line that is one point wide may actually result in a line that is two physical pixels wide.
percentages are to integers. 1% of the screen may be one pixel or three pixels depending on the hardware. retina-HD iPhone 7 has 401 pixels per inch as opposed to an iPhone 6 with 326 pixels per inch.