Changes

Jump to: navigation, search

An iPhone iOS 6 In-App Purchase Tutorial

375 bytes added, 14:55, 3 October 2012
no edit summary
[[Image:ios_6_in-app_purchase_example_ui.png|The user interface for an example iOS 6 iPhone In-App Purchase app]]
Figure 77-1
Load the InAppDemo project into Xcode, select the MainStoryboard.storyboard file, select the In App Demo View Controller scene and choose the ''Editor -> Embed In -> Navigation Controller'' menu option to add a navigation controller to the storyboard.
Next, design the user interface for the Level 1 screen as illustrated in the far left view of Figure 77 -1. Using the Assistant Editor, establish an Action connection from the “Buy Level 2 Access” button to an action method named purchaseItem:. Also establish an Outlet connection for the “Enter Level 2” button named level2Button.
On completion of these steps, the InAppDemoViewController.h file should read as follows:
[[Image:ios_6_in-app_purchase_storyboard.png|The Storyboard for an example iOS 6 iPhone In-App Purchase app]]
Figure 77-2
[[Image:iphone_ios_6_in_app_purchase_buy_view.png|The user interface for the in-app purchase buy view]]
Figure 77-3
[[Image:in-app_purchase_confirm.png|The iPhone iOS 6 In-App Purchase confirmation dialog]]
Figure 77-4

Navigation menu