Finally, in the first method of appdelegate, add the necessary code before the "return" statement.
The code has only 3 sentences, which is equivalent to 3 steps away. 1. Create window;2. set window background; 3. make window visible.
The syntax for OC and Swift is slightly different, but the code content is basically the same.
The code that OC needs to add
Self.window = [[UIWindow alloc] initwithframe:[[uiscreen mainscreen] bounds]];
Self.window.backgroundColor = [Uicolor Whitecolor];
[Self.window makekeyandvisible];
Code that Swift needs to add
Self.window = UIWindow (Frame:UIScreen.mainScreen (). Bounds)
self.window!. BackgroundColor = Uicolor.whitecolor ()
self.window!. Makekeyandvisible ()
3. The above does not work, xcode6 under the simulator can only display the contents of the 320*480, the upper and lower two black edges,
, only 4s can display full screen, more than 5, including 6 and plus all this
You didn't add the default picture for different devices.
4. Add Default image (Default.png, [email protected], [email protected])
After the success! Okay, kai-sen!
Ah, back to the original Xcode 5 familiar development mode! But still need to learn to use the storyboard (Main.storyboard) Oh!