Slide 29
Slide 29 text
ෳαΠζͷରԠ
͖ຖͷ֤σόΠεͷαΠζ(Rect)Λฦ͢ϝιουΛੜͨ͠Γ
͢ΔͱָʹͳΓͦ͏Ͱ͢ɻ
func frame(with orientation: UIInterfaceOrientation) -> CGRect {
switch (self, orientation) {
case (.size_10_5_inch, .portrait):
return CGRect(x: 0, y: 0, width: 834, height: 1112)
case (.size_10_5_inch, .landscapeLeft):
return CGRect(x: 0, y: 0, width: 1112, height: 834)
case (.size_12_9_inch, .portrait):
return CGRect(x: 0, y: 0, width: 1024, height: 1366)
case (.size_12_9_inch, .landscapeLeft):
return CGRect(x: 0, y: 0, width: 1366, height: 1024)
default:
return CGRect.zero
}
}
}