Swift version of iOSDeviceScreenAdaptor
Get instance eg: Use iPhoneX as designed screen
LFScreenAdaptor.sharedAdaptor
Set designed screen
LFScreenAdaptor.sharedAdaptor.designScreen = .Type5_8
Get screen based adapted value
// width based transform
let designedWidth = LFScreenAdaptor.sharedAdaptor.adaptedWidth(width: screenWidth)
// height based transform
let designedHeight = LFScreenAdaptor.sharedAdaptor.adaptedHeight(height: screenHeight)
Get current device / screen type
LFScreenAdaptor.sharedAdaptor.currentDevice.name
LFScreenAdaptor.sharedAdaptor.currentScreen
LFDataMigrater is available under the MIT license. See the LICENSE file for more info.