Changes

Jump to: navigation, search
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_IOS6ios9_upgrade</googlehtmlet>
Navigate to the ''MainStoryboard.storyboard'' file in the project navigator panel and select it to load it into to the editing panel. Click on the background of the view object and change the background color to a light shade of grey using the Attribute Inspector panel.
Drag, position and configure a Text View, Image View and two Buttons on the view canvas so that the user interface reflects that illustrated in Figure 471-1:
[[Image:iphone_ios6_facebook_example_ui.png|The UI for an example iPhone iOS 6 app]]
Figure 471-1
== Adding the Social Framework to the Build Phases ==
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
Whilst the coding is complete, an attempt to compile the application at this point will result in undefined symbols because the Social Framework and Mobile Core Services libraries have not yet been added to the project. Within the project navigator panel, therefore, select the SocialApp target at the top of the list and in the main panel select the Build Phases tab. In the Link Binary with Libraries category, click on the + button and in the resulting list of libraries select and add the Social.framework library. Repeat this step to also add the MobileCoreServices.framework library to the project.
== Running the Social Application ==
With the coding now complete, click on the Run button in the Xcode toolbar to launch the application either on an iPhone device or using the Simulator environment. When the application appears, enter some text into the text area and select an image from the device (note that when using the simulator no images will be available). Touch the Post Message button to display the target selection screen shown in Figure 471-2:
[[Image:iphone_ios6_facebook_example_chooser.png|iPhone iOS 6 Facebook app social network selection]]
Figure 471-2
Select the Facebook button to display the preview sheet (Figure 471-3) and then, assuming no changes to the post need to be made, touch the Post button to send the message to your Facebook page.
[[Image:iphone_ios6_facebook_example_preview.png|Previewing an iPhone iOS 6 Facebook posting]]
Figure 471-3
<googlehtmlet>BUY_IOS6ios9_upgrade</googlehtmlet>
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">

Navigation menu