In this part of the IOS tutorial you will write the first IOS application, various steps involved in creating the application, its output and more.
500% salary hike received by a working professional post completion of the course*
Fresher earned 30 LPA salary package on completion of the course*
53% of learners received 50% and above salary hike post completion of the program*
85% of the learners achieved their training objectives within 9 months of course completion*
95% learner satisfaction score post completion of the program*
Process Advisors
To create the application in iOS, use the following steps: Step 1: Open Xcode and choose Create a new Xcode project to start a new project:
Step 2 − Select Single View Application and click “Next”.
Step 3: Fill specified information
Click next after filing the above information
Step 4: Choose the directory for the project and choose create.
Step 5: It will show a screen as follows:
Step 6: Then choose iPhone simulator in the drop down close to Run button and choose run. Automatically Xcode creates the app and runs it in the Simulator. The simulator looks like as follows: It shows blank screen because app is incomplete. To end the app presses the Stop button.
Step 7: Choose HelloWorldViewController.xib to complete your app. After choosing the file the editor changes to an interface builder and shows an empty view of app like as follows:
Step 8: Select the UI controls from the right side panel. For this HelloWorld app select Round Rect Button” and drag it into the view. Try to place the button at the center of the view.
Step 9: To alter the label of the button double press it and name it “Hello World” and then run the app again then it looks like as follows:
Step 10: But this button does not perform any action so to perform action use the code. Choose the HelloWorldViewController.h then editor area now shows the source code of the chosen file. Insert the following line of code before the “@end” line:
-(IBAction)showMessage;
After editing the file at the end it look like as follows:
Step 11: Then choose the “HelloWordViewController.m” and add the code before the @end like as follows: After editing it look like as follows:
Step 12: Now set up a link between the HelloWorld button & showMessage action. For this purpose, choose the HelloWorldViewController.xib file to go back to the Interface Builder. Press and grip the Control and click HelloWorld button & drag to the File’s Owner. Then it will look like as follows:
Step 13: Release both buttons and displays the showMessage action. Choose it to build a link.
Step 14: Then again run the app using simulator. It will display following output:
Learn how to structure the app in our blog on Structuring an iOS app.
Course Schedule
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Browse Categories
Chennai Jersey City Dubai Los Angeles San Francisco Singapore Toronto Bangalore Chicago Houston Hyderabad London Melbourne New York San Jose Sydney Atlanta Austin Boston Charlotte Columbus Dallas Denver Fremont Irving Mountain View Philadelphia Phoenix San Diego Seattle Sunnyvale Washington Ashburn Kochi Kolkata Pune Noida Jaipur Delhi Gurgaon Mumbai Lucknow Gorakhpur Ahmedabad Vizag Chandigarh Coimbatore Trivandrum