/// Get the lauch image.
class var LaunchImage : UIImage {
get {
var lauchImage : UIImage!
var viewOrientation : String!
let viewSize = UIScreen.main.bounds.size
let orientation = UIApplication.shared.statusBarOrientation
if orientation == .landscapeLeft || orientation == .landscapeRight {
viewOrientation = "Landscape"
} else {
viewOrientation = "Portrait"
}
let imagesInfoArray = Bundle.main.infoDictionary!["UILaunchImages"]
for dict : Dictionary <String, String> in imagesInfoArray as! Array {
let imageSize = CGSizeFromString(dict["UILaunchImageSize"]!)
if imageSize.equalTo(viewSize) && viewOrientation == dict["UILaunchImageOrientation"]! as String {
lauchImage = UIImage(named: dict["UILaunchImageName"]!)
}
}
return lauchImage
}
}
Swift-[IphoneX 체크] (0) | 2018.02.07 |
---|---|
Swift-[Network 상태 확인] (0) | 2018.02.07 |
IOS 서버 없이 앱 업데이트 알림 팝업 띄우기 (0) | 2017.09.19 |
IOS 앱스토어 등록전 준비 사항 (0) | 2017.08.02 |
IOS 런처 스크린 각 이미지 사이즈 정리 (0) | 2017.07.04 |