SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
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 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
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;
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 the
UIViewController.
*Do NOT set self.view anywhere else besides in loadView.
*Do NOT implement loadView without setting self.view (i.e. you must set
self.view in 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 design
     - View Controller

   - Interface Builder or Storyboard

   - Delegation & Target-action

   - Application Lifecycle
MVC
                          should
                                   did
                       will                 target

                       controller
                                          outlet
                      count
Notification




                                          de
                         data




                                   da
 & KVO




                                             le
                                     ta

                                             ga
                                                        action




                                               te
                                         so
                                           urc
                                           es
              model                                  view
General process for building
iPhone 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
Facebook API
FB iOS SDK
• Methods
 •   Authentication

 •   Dialog

 •   Request

• Protocols
 •   FBDialogDelegate

 •   FBRequestDelegate

 •   FBSessionDelegate
Bookmark   Search
Create a FB iOS App




https://developers.facebook.com/docs/guides/mobile/
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 directly

Step 3: Implementing Single Sign-On (SSO)
    *access_token
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

Mais conteúdo relacionado

Semelhante a Iphone course 3

iOS Development Introduction (MuMe11)
iOS Development Introduction (MuMe11)iOS Development Introduction (MuMe11)
iOS Development Introduction (MuMe11)
Gonzalo Parra
 
UIViewControllerのコーナーケース
UIViewControllerのコーナーケースUIViewControllerのコーナーケース
UIViewControllerのコーナーケース
Katsumi Kishikawa
 

Semelhante a Iphone course 3 (20)

From mvc to viper
From mvc to viperFrom mvc to viper
From mvc to viper
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
iOS Design Patterns
iOS Design PatternsiOS Design Patterns
iOS Design Patterns
 
Intro to Continuous Integration at SoundCloud
Intro to Continuous Integration at SoundCloudIntro to Continuous Integration at SoundCloud
Intro to Continuous Integration at SoundCloud
 
iPhone Programming in 30 minutes (?) [FTS]
iPhone Programming in 30 minutes (?) [FTS]iPhone Programming in 30 minutes (?) [FTS]
iPhone Programming in 30 minutes (?) [FTS]
 
Spring 3 MVC CodeMash 2009
Spring 3 MVC   CodeMash 2009Spring 3 MVC   CodeMash 2009
Spring 3 MVC CodeMash 2009
 
iOS Development Introduction (MuMe11)
iOS Development Introduction (MuMe11)iOS Development Introduction (MuMe11)
iOS Development Introduction (MuMe11)
 
iOS Dev Intro
iOS Dev IntroiOS Dev Intro
iOS Dev Intro
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
iOS
iOSiOS
iOS
 
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT ConferenceTelerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
 
スケーラブル SwiftUI プロジェクトにおける実用的な TCA モジュラー化
スケーラブル SwiftUI プロジェクトにおける実用的な TCA モジュラー化スケーラブル SwiftUI プロジェクトにおける実用的な TCA モジュラー化
スケーラブル SwiftUI プロジェクトにおける実用的な TCA モジュラー化
 
I pad uicatalog_lesson02
I pad uicatalog_lesson02I pad uicatalog_lesson02
I pad uicatalog_lesson02
 
IOS APPs Revision
IOS APPs RevisionIOS APPs Revision
IOS APPs Revision
 
iPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone DevelopmentiPhone Camp Birmingham (Bham) - Intro To iPhone Development
iPhone Camp Birmingham (Bham) - Intro To iPhone Development
 
Unit Testing 101
Unit Testing 101Unit Testing 101
Unit Testing 101
 
UIViewControllerのコーナーケース
UIViewControllerのコーナーケースUIViewControllerのコーナーケース
UIViewControllerのコーナーケース
 
SUG Bangalore - Extending Sitecore Experience Commerce 9 Business Tools
SUG Bangalore - Extending Sitecore Experience Commerce 9 Business ToolsSUG Bangalore - Extending Sitecore Experience Commerce 9 Business Tools
SUG Bangalore - Extending Sitecore Experience Commerce 9 Business Tools
 
December 2014 University iOS Meetup Talk
December 2014 University iOS Meetup TalkDecember 2014 University iOS Meetup Talk
December 2014 University iOS Meetup Talk
 
iOS: View Controllers
iOS: View ControllersiOS: View Controllers
iOS: View Controllers
 

Mais de Janet Huang (10)

Transferring Sensing to a Mixed Virtual and Physical Experience
Transferring Sensing to a Mixed Virtual and Physical ExperienceTransferring Sensing to a Mixed Virtual and Physical Experience
Transferring Sensing to a Mixed Virtual and Physical Experience
 
Collecting a Image Label from Crowds Using Amazon Mechanical Turk
Collecting a Image Label from Crowds Using Amazon Mechanical TurkCollecting a Image Label from Crowds Using Amazon Mechanical Turk
Collecting a Image Label from Crowds Using Amazon Mechanical Turk
 
Art in the Crowd
Art in the CrowdArt in the Crowd
Art in the Crowd
 
How to Program SmartThings
How to Program SmartThingsHow to Program SmartThings
How to Program SmartThings
 
Designing physical and digital experience in social web
Designing physical and digital experience in social webDesigning physical and digital experience in social web
Designing physical and digital experience in social web
 
Of class2
Of class2Of class2
Of class2
 
Of class1
Of class1Of class1
Of class1
 
Iphone course 2
Iphone course 2Iphone course 2
Iphone course 2
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Openframworks x Mobile
Openframworks x MobileOpenframworks x Mobile
Openframworks x Mobile
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Iphone course 3

  • 1. iPhone Application Development III Janet Huang 2011/12/07
  • 2. Today’s topic • iOS programming review • Facebook API • Location + Facebook App
  • 3. overview of iPhone application
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.  Key objects in an iOS app
  • 9.
  • 11. 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
  • 12. 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;
  • 13. 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 the UIViewController. *Do NOT set self.view anywhere else besides in loadView. *Do NOT implement loadView without setting self.view (i.e. you must set self.view in loadView).
  • 14. Segues a pointer to top-level UIView in the Controller’s View
  • 15. Review - Objective-C - Class, Methods, Properties, Protocols, Delegation - MVC and UIViewController - MVC design - View Controller - Interface Builder or Storyboard - Delegation & Target-action - Application Lifecycle
  • 16. MVC should did will target controller outlet count Notification de data da & KVO le ta ga action te so urc es model view
  • 17. General process for building iPhone 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
  • 19. FB iOS SDK • Methods • Authentication • Dialog • Request • Protocols • FBDialogDelegate • FBRequestDelegate • FBSessionDelegate
  • 20.
  • 21.
  • 22.
  • 23. Bookmark Search
  • 24. Create a FB iOS App https://developers.facebook.com/docs/guides/mobile/
  • 25. 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 directly Step 3: Implementing Single Sign-On (SSO) *access_token
  • 26. Step 1: Step 2: Step 3: Step 4:
  • 28. modify the app property list file
  • 32. Add Social Channel Request News Feed