Mac

Displaying Maps in iPad Applications and Monitoring Changes using the Map Kit

Displaying Maps and Monitoring Changes using the Map Kit

Beginning iPad Application Development bookThe iPhone SDK 3.2 ships with the Map Kit framework, a set of libraries that work with the Google Mobile Maps Service. You can use the Map Kit to display maps within your iPad application, as well as to display your current location. In fact, you can enable the Map Kit to track your current location simply by setting a single property and Map Kit will then automatically display your current location as you move.

In the following Try It Out, you will get started with the Map Kit. In particular, you will use the Map Kit to display your current location on the map.

Tags:

Creating iPad Application Preferences

Creating iPad Application Preferences

Beginning iPad Application Development bookCreating application preferences for your iPad application is a pretty straightforward process. The process involves adding a resource called the Settings Bundle to your project, configuring a property list file, and then deploying your application. When your application is deployed, the application preferences are automatically created for you in the Settings application.

The following Try It Out shows how to add application preferences to your iPad application project in Xcode.

Tags:

Creating A Simple iPad Application Table View

Creating A Simple iPad Application Table View

The best way to understand how to use a Table view in your iPad application is to create a new View-based Application project and then manually add a Table view to the view and wire it to a View Controller. That way, you understand the various building blocks of the Table view.

Without further ado, use the following Try It Out to create a new iPad project and see how to put a Table view together!

Tags:

iPad Application Development Outlets and Actions

Beginning iPad Application Development book coverOutlets and Actions

One of the first things you need to understand in iPad programming is outlets and actions. If you are familiar with traditional programming languages such as Java or C#, this is a concept that requires some time to get used to — the concepts are similar, just that it is a different way of doing things. At the end of this section, you will have a solid understanding of what outlets and actions are and how to create them, and be on your way to creating great iPad applications.

Tags:

Detecting iPhone Touch Events

Detecting Touches

Tags:

Best Practices in iPhone UI Design

Best Practices in iPhone UI Design

When you are designing for the iPhone, you should keep in mind several best practices:

  • Remember the touch! Perhaps no tip is more critical in iPhone UI design than double-checking every design decision you make with the reality of touch input. For example, ESPN’s Podcenter, shown in Figure 4-14, uses a UI that roughly simulates the Apple navigation list design. However, notice the rows are thinner, making it harder to touch the correct podcast item, especially if the user is walking or performing another physical activity.

  •  

     

Tags:

iPhone Database Storage Using SQLite3

iPhone Database Storage Using SQLite3

 

For simple iPhone applications, you can write the data you want to persist to a simple text file. For more structured data, you can use a property list. For large and complex data, it is more efficient to store them using a database. The iPhone comes with the SQLite3 database library, which you can use to store your data. With your data stored in a database, your application can populate a Table view or store a large amount of data in a structured manner.

Tags:

Screen Layout: Emulating Apple Design in iPhone Safari Web Pages

Screen Layout: Emulating Apple Design

By the time you have studied and evaluated the UI design of the built-in applications, you can begin to determine what parallels may exist with the type of application in which you are building.

For applications that need to use a navigation list design, download one of the frameworks that I discussed back in Chapter 3, “Building with Web App Frameworks” [of the book "Safari and WebKit Development for iPhone OS 3.0" by Richard Wagner (ISBN: 978-0-470-54966-7, Wrox, 2009, Copyright John Wiley & Sons, Inc.] Each of these enables you to easily implement edge-to-edge navigation list–based applications.

Tags:

Programming Responses to iPhone Device Rotations

Responding to Device Rotations

One of the features that modern mobile devices support is the ability to detect the current orientation— portrait or landscape—of the device. An application can take advantage of this ability to readjust the device’s screen to maximize the use of the new orientation. A good example is Safari on the iPhone. When you rotate the device to landscape orientation, Safari automatically rotates its view so that you have a wider screen to view the content of the page (see Figure 6-1).

 

Tags:

Programming iPhone Alerts

Using the Alert View

One of the views that is not listed in the XCode Library is the UIAlertView. The UIAlertView displays an alert view to the user and is usually created during runtime. Hence, to use it you have to create it using code.

The UIAlertView is useful for cases in which you have to display a message to the user. In addition, it can serve as a quick debugging tool when you want to observe the value of a variable during runtime.

The following Try It Out explores the UIAlertView in more detail. You need to download the code as indicated here.

Codefile [UsingViews.zip] available for download at Wrox.com

 

Tags:
Syndicate content