1
我使用點擊欄控制器庫,所以我不得不類控制器的名稱更改爲RAMAnimatedTabBarController
使用的功能。但在應用程序的委託時,我想現在它顯示此錯誤使用未聲明的類型「的ViewController」
使用未申報類型的主杆「RAMAnimatedTabBarController」
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
if UserDataSingleton.sharedDataContainer.logged == "logged" {
let mainStoryboardIpad : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let initialViewControlleripad : UIViewController = mainStoryboardIpad.instantiateViewController(withIdentifier: "Order") as! RAMAnimatedTabBarController // error here
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window?.rootViewController = initialViewControlleripad
self.window?.makeKeyAndVisible()
}else{
let mainStoryboardIpad : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let initialViewControlleripad : UIViewController = mainStoryboardIpad.instantiateViewController(withIdentifier: "loginViewController") as! loginViewController
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window?.rootViewController = initialViewControlleripad
self.window?.makeKeyAndVisible()
}
不'RAMAnimatedTabBarController'延長'UIViewController'? – Danoram
的UITabBarController – leo0019