Contact Person

퐁당풍당

Mobile Developer Share

관리자 글쓰기 로그인

Mobile Developer Share

    카테고리

    • APP (25)
      • Android (11)
        • Develop (9)
        • Error (2)
      • IOS (9)
        • Develop (9)
        • Error (0)
      • - (2)
    IOS/Develop

    Swift-[런처스크린 불러오기]

    : 퐁당풍당
    : 2018. 1. 16. 10:59

    1. IOS 런처 스크린 해당 디바이스 크기로 불러오기

    /// 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

            }

        }



    저작자표시 동일조건 (새창열림)

    'IOS > Develop' 카테고리의 다른 글

    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
    퍼가기
    최근에 올라온 글
    RECENT POSTS
    최근에 달린 댓글
    RECENT COMMENTS
    LINK
    -
    방문자수
    COUNTER
    Today
    Yesterday
    Total
    퐁당풍당’s Blog is powered by / Designed by UX공작소
    위로가기

    티스토리툴바