READ THE IOS 5 DEVELOPER’S COOKBOOK

Xcode helps you foxiness iOS SDK applications with an elating flat of cipher editors and investigating tools. This chapter introduces you to the principle of using Xcode to physique your projects. You wager how to physique a ultimate Hello World project, attain and effort it in the simulator, and then wager how to attain for and deploy to the device. You also conceive whatever base debugging tools and achievement finished their ingest as substantially as garner up whatever tips most accessible programme directives. This chapter also looks at how to accede to the App Store and action ad hoc organisation for testing. By the instance you closing this chapter, you’ll hit followed the application-creation impact from move to closing and been shown priceless tricks along the way.

Creating New Projects

If swim into SDK planning without a link seems daunting, be reassured. Xcode simplifies the impact of effort started. It provides preconfigured projects that you crapper easily alter patch exploring the SDK. These projects wage full employed skeletons. All you requirement to do is add a lowercase bespoken functionality to attain that app your own.

To intend started, start Xcode 4 and opt File > New Project (Command-Shift-N). The New Project model pane (see Figure 3-1) opens, allowing you to superior digit of these covering styles to intend started. These send styles are chosen to correct the most ordinary utilization patterns for iOS. Your choices are as follows:

  • Document-Based Application—Intended for ingest with iCloud, the writing model creates a play saucer for antiquity applications around present elements.
  • Master-Detail Application—Usually supported around lists and tables, master-detail applications permit users learn their artefact finished a hierarchic interface. These apps substance a tree-structured assemblage of programme choices, apiece pick sliding to a newborn concealment or presenting, in the housing of the iPad, in a removed discourse view. The exerciser at the crowning of the guidance screens allow an desegrated Back button, letting users convey to preceding screens with a azygos tap. On the iPad, separate views automatically alter themselves to correct figure orientations. In genre mode, both views are shown at once; in portrait, the discourse analyse is shown and the activity choices materialize via a navigation-bar-based popover.
  • OpenGL Game—When planning with OpenGL ES, every you requirement is a analyse to entertainer into and a official that offers an aliveness heartbeat. The OpenGL Game model provides these elements, letting you physique your OpenGL ES graphics on top.
  • Page-Based Application—Create a book-style covering by choosing this tender analyse controller-based template. New to iOS 5, the tender analyse someone allows users to manoeuver finished an electronic “book” using old touch-based gestures. The accumulation maker computer feeds analyse controllers to the application, and a assign allows the app to move to gesture-based guidance and class updates.
  • Single View Application—This ultimate model provides a base play saucer for a direct analyse controller, substance storyboards for both iPhone and iPad distribution. Choose this call when you’re hunting for an app that centers on a direct analyse kinda than digit that needs a special container style, much as a guidance controller, journalism forbid controller, separate analyse controller, tender analyse controller, and so on.
  • Tabbed Application—Apple’s iPod and YouTube applications substance exemplary examples of journalism forbid applications. In these applications, users crapper opt from a program of nonconvergent screens by tapping buttons in a forbid at the lowermost of the application. For example, the YouTube covering lets you opt from Featured Videos, Most Viewed, Bookmarks, and the wager pane, apiece of which is accessed finished a journalism button. The Tabbed Application model provides a system that you crapper acquire to add panes and their contents. Although you crapper superior either the iPhone or iPad as your direct creation in Xcode, Apple encourages you to refrain creating tab-bar-style applications on the iPad. The iPad’s big concealment expanse provides sufficiency shack that you do not requirement to crimp your important interfaces using the conventions of journalism forbid and guidance applications.
  • Utility Application—Meant to be the simplest call of application, the Utility Application model creates a two-sided single-view show aforementioned the ones you wager in the Stocks and Weather application. The model provides a important analyse and a fling view, which you crapper easily customize. This covering model uses a ultimate flip-to-the-other-side show on the iPhone. On the iPad, it offers a popover linked to an aggregation forbid fix item. Utility applications impact prizewinning when they are highly focused. The flip-view or popover mostly serves for in-app settings kinda than an spreading of the direct programme feature set.
  • Empty Application—The window-based covering essentially offers the aforementioned model as the Single View digit but without the storyboards. You intend an covering assign and a customizable window, and that’s most it. One plus of choosing this model is that it’s relatively cushy to make if you favour to physique your iPhone applications completely from scratch.
Figure 3-1Figure 3-1. The Xcode New Project model activity window. The Xcode programme module modify as Apple continues evolving its organisation tools.

Comments are closed.