You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apple releases new devices each year(sometimes some season), and it force this library to release new version whenever new size of device came out.
When it comes to device size, most of people expect this lib to do its best effort, I think.
So I'd like to propose Device.size to return the nearest size as long as they know in the released version.
Once my proposal accepted, Device.size would be implemented like below.
static public func size() -> Size {
/ * bra bra bra * /
switch screenHeight {
case 0...480:
return .screen3_5Inch
case 481...568:
return .screen4Inch
case 569...667:
return UIScreen.main.scale == 3.0 ? .screen5_5Inch : .screen4_7Inch
case 668...736:
return .screen5_5Inch
/* and so on... */
What do you people think about this?
The text was updated successfully, but these errors were encountered:
Apple releases new devices each year(sometimes some season), and it force this library to release new version whenever new size of device came out.
When it comes to device size, most of people expect this lib to do its best effort, I think.
So I'd like to propose
Device.size
to return the nearest size as long as they know in the released version.Once my proposal accepted,
Device.size
would be implemented like below.What do you people think about this?
The text was updated successfully, but these errors were encountered: