iPhone Application Development III            Janet Huang             2011/12/07
Today’s topic• iOS programming review• Facebook API• Location + Facebook App
overview of iPhone application
 Key objects in an iOS app
View Controller
View Controller •   Important property in UIViewController     @property (retain) UIView *view;                     a poin...
View Controller• After the UIViewController is initialized,  viewDidLoad is called    - (void)viewDidLoad;• Just before th...
View Controller • Creating a UIViewController’s UI in code     (no .xib, no storyboard)    • override - (void)loadView;   ...
Segues   a pointer to top-level UIView in the Controller’s View
Review   - Objective-C     - Class, Methods, Properties, Protocols, Delegation   - MVC and UIViewController     - MVC desi...
MVC                          should                                   did                       will                 targe...
General process for buildingiPhone application         1.	  Create	  a	  simple	  MVC	  iPhone	  applica5on         2.	  B...
Facebook API
FB iOS SDK• Methods •   Authentication •   Dialog •   Request• Protocols •   FBDialogDelegate •   FBRequestDelegate •   FB...
Bookmark   Search
Create a FB iOS Apphttps://developers.facebook.com/docs/guides/mobile/
Step1: Registering your iOS App with Facebook                                                   https://developers.faceboo...
Step 1:Step 2:Step 3:Step 4:
Step 5:Step 6:
modify the app property list file
Test it!! :D
Add Requesting Additional Permissions
Add Graph API
Add Social Channel  Request News Feed
Implementation & Integration
Iphone course 3
Iphone course 3
Iphone course 3
Iphone course 3
Iphone course 3
Iphone course 3
Iphone course 3
Iphone course 3
Upcoming SlideShare
Loading in …5
×

Iphone course 3

771 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
771
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Iphone course 3

  1. 1. iPhone Application Development III Janet Huang 2011/12/07
  2. 2. Today’s topic• iOS programming review• Facebook API• Location + Facebook App
  3. 3. overview of iPhone application
  4. 4.  Key objects in an iOS app
  5. 5. View Controller
  6. 6. View Controller • Important property in UIViewController @property (retain) UIView *view; a pointer to top-level UIView in the Controller’s View • View Controller have a “lifecycle” from creation to destruction- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)aBundle; initializer
  7. 7. View Controller• After the UIViewController is initialized, viewDidLoad is called - (void)viewDidLoad;• Just before the view appears on screen, you get notified - (void)viewWillAppear:(BOOL)animated;
  8. 8. View Controller • Creating a UIViewController’s UI in code (no .xib, no storyboard) • override - (void)loadView; • set self.view*Do NOT implement loadView if you use a storyboard/.xib to create theUIViewController.*Do NOT set self.view anywhere else besides in loadView.*Do NOT implement loadView without setting self.view (i.e. you must setself.view in loadView).
  9. 9. Segues a pointer to top-level UIView in the Controller’s View
  10. 10. Review - Objective-C - Class, Methods, Properties, Protocols, Delegation - MVC and UIViewController - MVC design - View Controller - Interface Builder or Storyboard - Delegation & Target-action - Application Lifecycle
  11. 11. MVC should did will target controller outlet countNotification de data da & KVO le ta ga action te so urc es model view
  12. 12. General process for buildingiPhone application 1.  Create  a  simple  MVC  iPhone  applica5on 2.  Build  interfaces  using  Interface  builder 3.  Declara5ons a.  Declaring  instance  variables b.  Declaring  methods 4.  Make  connec5ons a.  SeDng  a  pointer b.  SeDng  targets  and  ac5ons 5.  Implemen5ng  methods a.  Ini5al  method b.  Ac5on  methods 6.  Build  and  run  on  the  simulator 7.  Test  applica5on  on  the  device
  13. 13. Facebook API
  14. 14. FB iOS SDK• Methods • Authentication • Dialog • Request• Protocols • FBDialogDelegate • FBRequestDelegate • FBSessionDelegate
  15. 15. Bookmark Search
  16. 16. Create a FB iOS Apphttps://developers.facebook.com/docs/guides/mobile/
  17. 17. Step1: Registering your iOS App with Facebook https://developers.facebook.com/apps/Step 2: Installing the iOS SDK git clone git://github.com/facebook/facebook-ios-sdk.git use git clone https://github.com/facebook/facebook-ios-sdk OR download it directlyStep 3: Implementing Single Sign-On (SSO) *access_token
  18. 18. Step 1:Step 2:Step 3:Step 4:
  19. 19. Step 5:Step 6:
  20. 20. modify the app property list file
  21. 21. Test it!! :D
  22. 22. Add Requesting Additional Permissions
  23. 23. Add Graph API
  24. 24. Add Social Channel Request News Feed
  25. 25. Implementation & Integration

×