Welcome to the Mobile Application Development STEM summer camp. I hope you find this fun, engaging, and rewarding. Don't be afraid to mess up or experiment, you'll learn more. Let's get started!
First, we will use the command line to navigate the computers files and directories. Follow the steps below:
Now we build our app with the steps below:
Follow the steps below to check in your code to a GitHub repository. If you have not signed up for a Github account, please do so here.
git config user.name "kellimohr" git config user.email me@kellimohr.com
Example:
Now, we will set up the local repository.
Now we are going to use HTML to change the look of the front page of our app.
Let's remove some pre-loaded HTML elements from our app.
<body> <script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/index.js"></script> </body>
Let's add headings, paragraph, and a square to our app. There are six heading sizes available. Heading 1 (h1) is the largest size. Add the following lines of code between the <body> and </body> tag before the <script> tags.
<h1>Shapes Game</h1> <h4>Square</h4> <p> A shape with 4 sides of the same length and 4 right angles.</p> <div style="width:50px;height:50px;border:2px solid #000;"> </div>
Run the emulator to see your results. We see the new elements that we added, but they do not look that great. We can use Cascading Style Sheets (CSS) to make our app look better. In Sublime, navigate to the css directory and open the index.css file.
p { padding-right: 10px; color: blue; }
Great! Our app looks much better. Now let's create a new square css element. Right now, our css we use to draw the square is inline in our html.index file. It will be a lot easier to find and update in our css.index file in the future.
<div id="square"> </div>
Add a new css element for the square id.
#square { width:50px; height:50px; border:2px solid #000; }
Now that we've built our square and the code works, it's a good time to check it into GitHub. Open your terminal to check in you files.
git add . git commit -m "Checking in code to create a square." git push
Let's add a circle. Unfortunately, there is no easy way to make a circle in HTML so we need to build it off of our code we used for the square.
<h4>Circle</h4> <p>A shape with an edge equidistant from a center point.</p> <div id="circle"> </div>
We will also need to add a new css element for the circle.
#circle { width: 50px; height: 50px; border:2px solid #000; border-radius: 50%; background: black; }
Now that we have another piece of working code. Let's check it in!
git add . git commit -m "Checking in code to create a circle." git push
Create a new Div to create a triangle. Hint: Experiment with the borders. Feel free to Google or check out these links:
iOS Tutorial with Swift Programming language and XCode: https://www.raywenderlich.com/114148/learn-to-code-ios-apps-with-swift-tutorial-1-welcome-to-programming
Or, work on your App pitch, check out these references for inspiration: