![]() ![]() Add a button that changes the view's background color from black to white:ġ. Next, you'll create an interaction that mimics the visual effect of turning on a light. This white background is the desired state of your app on launch, so you don't need to change anything yet. The background color for this view defaults to white. Open the Attributes inspector, which you can use to customize the attributes of any interface element.Look at the view controller's attributes: Leave the view in portrait orientation.Click the View as button at the bottom of the canvas to select the iPhone 8 configuration or the size of the view controller that corresponds to your device.If you're using Simulator, select the iPhone 8 simulator from the pull-down menu on the left side of the Xcode toolbar. If you’re using your own device, continue to step 2.Verify that your view controller is the correct size: You can use either Simulator or your own device for this project, but the size of the view controller on the canvas needs to be the same as the size of your screen. Select View Controller in the Document Outline view.Īt the top of the utilities area to confirm that this particular view controller is of type ViewController. To reveal all the view controllers defined in Main.storyboard.Ģ. ViewController is a subclass of UIViewController that Xcode predefines as part of the Single View App template and lists in the project navigator.ġ. The storyboard includes an instance of ViewController. Select Main.storyboard in the project navigator to open your storyboard in Interface Builder.Create a new Xcode project using the Single View App template that you've used in previous lessons.You'll continue to improve with more experience. Don't be discouraged if you struggle at first. This project gives you an opportunity to write some Swift code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |