Gewusst wie: hinzufügen UIView Fenster auf in-app-delegate in swift?

view-Objekt ist nicht immer in addsubview Halterung

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool
    {
            //Override point for customization after application launch.
            UIApplication.sharedApplication().setStatusBarHidden(true, animated: true);
            var myView = UIView(frame:CGRectMake(0, 200, 320, 100));
            myView.backgroundColor = UIColor.redColor()
            self.window.?.addSubview(myView)


            return true
    }
  • TUN. NICHT. TUN. DIESE. verwenden Sie die rootViewController statt.
Schreibe einen Kommentar