Search This Blog

Thứ Năm, 2 tháng 11, 2017

Iphone và iPad in ios

 func checkIdiom(){
        
        let deviceIdiom = UIScreen.main.traitCollection.userInterfaceIdiom
        
        // 2. check the idiom
        switch (deviceIdiom) {
            
        case .pad:
           
            Utils.idiom_saveCache(size: "iPad")
            break
            
        case .phone:
            
            Utils.idiom_saveCache(size: "iPhone")
            break
            
        default:
            
            Utils.idiom_saveCache(size: "iPhone")
            break
            
        }
        
        

    }

Không có nhận xét nào:

Đăng nhận xét