5. iPhone OS Architecture iPhone OS System Apps Applications Applications - Similar to the basic architecture of Mac OS X - iOS acts as an intermediary between the underlying hardware and the applications that appear on the screen - Applications that you create never interact directly with the hardware but instead go through system interfaces, which interact with the appropriate drivers.
28. Starting a Project – Step 2 XCode provides several project templates to get you up and develop your application - Navigation-based Application: that presents data hierarchically, using multiple screens - OpenGL ES Application: to present images or animation. Tab Bar Application: that presents a radio interface that lets the user choose from several screens Utility Application: that implements a main view and lets the user access a flip-side view to perform simple customizations. View-based Application: that uses a single view to implement its user interface. Window-based Application: serves as a starting point for any application, containing an application delegate and a window. Use this template when you want to implement your own view hierarchy.
29. Starting a Project – Step 2 Create a new project (File->New Project) A dialog will pop up Select View-Based Application then click Choose.
31. Starting a Project – Step 3 A dialog will pop up, asking for a project name. Name it HelloWorld
32. Starting a Project – Step 4 The XCode project window will open. You see on the left side, under Classes, are the classes you will be working with Toolbar Group & Files List Status Bar Detail View
33. Starting a Project – Step 4 The XCode project window will open. You see on the left side, under Classes, are the classes you will be working with Toolbar Group & Files List Status Bar Detail View Provides quick access to the most common XCode commands
34. Starting a Project – Step 4 The XCode project window will open. You see on the left side, under Classes, are the classes you will be working with Toolbar Group & Files List Status Bar Detail View - Provides an outline view of your project’ contents - You can move files and folders around and organize your project contents in this list
35. Starting a Project – Step 4 The XCode project window will open. You see on the left side, under Classes, are the classes you will be working with Toolbar Group & Files List Status Bar Detail View - Displays status messages for the project - During an operation,such as building or indexing, Xcode displays a progress indicator in the status bar to show the progress of the current task.
36. Starting a Project – Step 4 The XCode project window will open. You see on the left side, under Classes, are the classes you will be working with Toolbar Group & Files List Status Bar Detail View - Shows the item or items selected in the Groups & Files list - You can browse your project’s contents in the detail view, search them using the search field, or sort them according to column - The detail view helps you rapidly find and access your project’s contents.
37. Starting a Project – Step 4 HelloWorld.app is the the name of your application
38. Starting a Project – Step 4 HelloWorldAppDelegate is the application main class It contains the HelloWorldViewController
39. Starting a Project – Step 4 HelloWorldViewController is the “view” that you will see on the application
40. Starting a Project – Step 4 HelloWorldViewController.xib will be loaded by the application and is sort of a “canvas” where you can design the look of the application
41. Starting a Project – Step 5 Double click HelloWorldViewController.xib. The Interface Builder should open The View window is our HelloWorld screen. It’s blank now, but we are going to add a Label
42. Starting a Project – Step 6 Find Label on the Library window Objects->Cocoa Touch Plugin window and drag the Label instance onto View
43. Starting a Project – Step 7 Double click the label that you inserted into View, then type Hello World. Notice the text is off center. Center it. Lets bring up the Inspector window (Tools->Inspector) and Change the font color and font size
44. Starting a Project – Step 8 Save the xib file (File->Save). Quit Interface Builder. Go back to XCode and do Build and Go to compile and run your app.