CGRect

Overview

public struct CGRect { 
		public var origin: CGPoint
		public var size: CGSize
		public init()
		public init(origin: CGPoint, size: CGSize)
}

스크린샷 2022-10-11 오후 6.41.33.png

CGPoint

(1,2) x : 1, y : 2

public struct CGPoint {
		public var x: CGFloat
		public var y: CGFloat
		public init() 
		public init(x: CGFloat, y: CGFloat)
}

CGSize

Overview

A CGSize structure is sometimes used to represent a distance vector, rather than a physical size. As a vector, its values can be negative. To normalize a CGRect structure so that its size is represented by positive values, call the standaradized function.

스크린샷 2022-10-11 오후 6.35.50.png

public struct CGSize {
		public var width: CGFloat
		public var height: CGFloat
		public init()
		public init(width: CGFloat, height: CGFloat)
}