Posts

Showing posts with the label Tutorials

[iPhone Tutorial] Create your own iPhone Stopwatch App

Image
Let’s take our existing Clock App we created during our previous tutorials and turn it into a stopwatch. It will look similar to the standard iPhone Clock implementation. Open the ViewController.xib file and move rgw label closer to the top to make a little room for a Start/Stop button at the bottom. Now drag a new button over, change the text to “START”, and size it so it is about the width of the label. Switch to the Sizing inspector and change the Autosizing to stick to the bottom edge of the view. The button and Autosizing should look like Figure A . Figure A Bring up the assistant editor as you did in the previous article so that an action can be added when the button gets tapped. Draw a connection by holding down the control key while dragging from the button to below the label property and release. This time you need to change the connection type to Action, set the name to “onButton” and change the Type to UIButton. Make sure the popup looks like Figure B be...

[iPhone] Tutorial - Create a Hello World iPhone app

Image
Create a Hello World iPhone app For my first iOS tutorial, I will describe how to create the typical Hello World application for iPhone, which we will build on in future posts. I assume you have an Intel-based Mac with Xcode installed. 1. Launch Xcode and create a new project by clicking the Create A New Xcode Project button on the splash screen ( Figure A ). Or, if you dismissed the splash screen, you can select File | New | Project from the menu. Select Single View Application from the list of templates. Figure A 2. Verify that all of these options are set in the next dialog box ( Figure B ) - if you don’t, you will have problems following this tutorial: Product Name is Hello. Device Family is set to iPhone. Use Storyboards is not selected. Use Automatic Reference Counting is selected. Figure B The project will be created and set up with specific files based on these initial settings. 3. Click Next and pick a location to store the project. Xcode will cre...