![]() See File: Exercise Layout Constraints Solution (54.4 kB) You will want to use constraints to achieve the desired result. Build a layout that looks like these images on the various screen sizes: Use the video on Auto Layout to solve this exercise. See File: Exercise Functions Solution Playground (7.6 kB) ![]() Call those functions and pass different values into the parameters - ensure they are producing the correct results.Create a function named divide that takes two parameters of type Double and returns the result of dividing the first parameter by the second.Create a function named multiply that takes two parameters of type Float and returns the product of the two numbers.Create a function named subtract that takes two parameters of type Int and returns the difference of the two numbers.Create a function named add that takes two parameters of type Double and returns the sum of the two numbers.See File: Section 01 Exercise 02 Solution Playground (7.9 kB) Using that 3rd variable again, store the result of concatenating the first two string but instead using "\(someVar)" syntax.Create a 3rd variable to store the result of concatenating the first two strings (using the symbol).Create another variable of type String with a value of "World".Create a variable of type String with a value of "Hello".Create another explicit variable of any name of type Int but DO give it an initial value of 423.Create an explicit variable of any name of type Double and don't give it any value.Create 3 constants (let) of any name and of any value, but all on the same line.Create 3 new variables of any name and of any value, but all on the same line.Create a 6th variable that stores the result of the 1st variable divided by the 2nd variable - the result should be 3.Create a 5th variable that stores the result of the 1st variable minus the 2nd variable - the result should be 10.Create a 4th variable that stores the result of a multiplication operation - the stored result should be equal to 45.Create a 3rd variable that stores that sum of the 1st and 2nd variables ( 20 should print to the screen).Create a 2nd variable with a name of your choosing that has a value of 5.Create a variable with a name of your choosing that has a value of 15.Using Swift and an Xcode Playground you are going to perform some simple math operations. See File: Section 02 Exercise 01 Solution (70.8 kB) Your final app could look similar to this: You will have to restart the app from Xcode to see those images again. Tapping the buttons once each will hide each corresponding image. If you've built the app correctly, when you press the Run button to run your app on the simulator, you should see a red image, a blue image, and two buttons. Turn off support for Landscape Left and Landscape Right and turn on support for Upside Down and Portrait.If the blue button is pressed the blue image should hide.If the red button is pressed the red image should hide.The second button should say, "Hide Red".The first button should say, "Hide Blue".Put two buttons on the screen/storyboard. ![]() Put those two images on the screen in the storyboard.Grab two images (or make your own) from the Internet, one that is Red and one that is Blue.Build this app for and using the iPhone 6 simulator.Use the instructional video for help as your are building your application. ![]() You are going to build an app similar to the Boom App in the video. Project 1: Building an iOS App on Your Own
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |