SlideShare une entreprise Scribd logo
1  sur  37
Getting Started with iOSProgramming Code Camp Oct 2011 Una Daly
Una Daly Foothill College Instructor (adjunct) Director, College Open Textbooks Apple Software Engineer & Manager  10 years Networking Software Engineer
Audience Experience C, C++ Java Objective-C
Agenda Getting Starting Slides:   20-25 minutes Download the iOS SDK  Setup your development environment Brief overview of the iPhone OS architecture  Tools: Xcode, Interface Builder, iOS Simulator, and Instruments  Objective-C syntax   Hello Coders   (explain tools for real here) - 10 minutes Add a custom icon  - 5 minutes    Model-View-Controller – 5 minutes   MyCalc (implementation)  - 15 minutes
The iOS Journey Register as Apple Developer Read Getting Started Documentation Download SDK Start project Join iOS Developer $99 			OR Take Foothill Class • Submit to AppStore Some rights reserved cc-by-nc-sa by airdiogo
Apple Developer Center
iOS ArchitectureCore OS OSX Kernel Mach 3.0 BSD Sockets Security Power Management Keychain Access Certificates File System Bonjour
iOS ArchitectureCore Services Collections Address Book Networking File Access SQLite Core Location Net Services Threading Preferences URL Utilities
iOS ArchitectureMedia Core Audio OpenAL Audio Mixing Audio Recording Video Playback JPEG, PNG, TIFF PDF Quartz (2D) Core Animation OpenGL ES
iOS ArchitectureCocoa Touch Multi-Touch Core Motion View Hierarchy Localization Controls Alerts Web View Map Kit Image Picker Camera
iOS Platform Tools : Xcode, Interface Builder, Instruments Language:  Objective- C 							[object  message: arg] Frameworks :  Foundation, UIKit, CoreGrapics Design Strategy:  Model-View-Controller
iOS ToolsIntegrated Development Environment (Mac OS X) Xcode Interface Builder Simulator Instruments
Main iOS Frameworks Foundation (NextStep) NSObject, NSString, NSArrays, NSDictionaries, etc. UIKit Views, Windows, etc …  (.xib files) Core Graphics Drawing intensive apps only
Objective-C  Object-oriented language C Programming Language Dynamic runtime environment Java-like method selection
Objective-C Classes Objective-C source code files .h --  interface files .m – implementation files
Objective-C Scope Accessing instance variables @private      - only class can access @protected – only class and subclass (default) @public        - any class can access   General rule of thumb … Make all instance variables private and use the properties directive to generate getter and setters.
Method syntax (NSString *) foo : (int) zap  bar : (double) pow; 	• Method name is “foo:bar:” 	• It has two arguments: int zap;                  double pow; • Return type is NSStringof Foundation class
Sending Messages Dynamically dispatched by runtime Method name (selector) decoupled from code Runtime dynamically looks up to find method
Class Instantiationsimple case alloc init release
Model-View-Controller Model is data engine View is user interface Controller is bridge between model & view Sets view (instance variables) Outlets Receives Actions (user input) from View Formats model’s data for display in view Controller    Model      View
Actions & Outlets Connecting objects to UI Views Views send IBActions to Controller btnClicked Controllers talk to view through IBOutlets txtFieldName
Our First ProjectHello Coders • Launch Xcode     Create a “View” project called HelloCoders     Look at the files created by default HelloCodersAppDelegate.h  (Objective C) HelloCodersAppDelegate.m HelloCodersViewController.h HelloCodersViewController.m HelloCodersViewController.xib        Click on Run to build and launch app        So we have a blank screen – not too interesting
Hello Coderscontd. Click on HelloCodersViewController.xib to launch Interface Builder. Called the nib file and contains an XML description of your user interface.	 Three items appear File Owner – runtime object that owns the nib First Responder – first view in the chain to respond to events. View window shows the graphical layout
Let’s add some UI elements Open the Objects Library (View->Utilities) Choose a label and drag onto window Double click and type “Hello Coders” Tools->Attribute Inspector and type “Hello Coders” Change alignment, font size etc from attribute window. Drag & drop a Text Field view to the View Window Drag & drop a Button view to the View Window Tools->Attribute and type “Click Me!” in button title Save .xib file and Run
What does the .xib file look like?
Run the User Interface Launch the app Try typing into text field.  Keyboard appears Click in and out of your app using home key. Time to implement action in code Add btnClicked method and txtName instance variable declaration in HelloCodersViewController. h file.	 Write btnClicked method to display an alert in the Hello CodersViewController.m  file. Now Run your app again …. What’s Missing???
Connect Action and Outlet Open the .nib file Control click the button to the File Owner Select btnClicked Control click the File Owner to the textfield Select txtname Save, Build & Run …  YES ….
Add a custom icon for your app Let’s make the application prettier Icons for iPhone apps are 57x57 Icons for iPads are 72x72 Icons for high-resolution iPhones are 114x114 Drag & Drop icon onto Support folder of your project.  Make a copy if asked.  Select the HelloCoders-Info.plist in the Support Folder.  Select the icon file item and set its value to the name of the icon file. 3.  Choose Run and watch your application launch this time.
Simulator running our Appwith app icon
Model-View-ControllerReview Model is data engine View is user interface Controller is bridge between model & view Sets view instance vars Receives Actions from View Formats model’s data for display in view Controller    Model      View
Simple CalculatorModel-View-Controller CalcViewController Get Actions from View Call Brain to do Math Update View with Results CalcBrain Do the Math here!!! Sqrt 	Inverse 	Clear	 CalcView    Display             IBOutlet    Buttons		  IBAction      1,2,3,4, 5, 6, 7,8,9 sqrt, 1/x, clr
Simple Calculator User Interface (.xib) file
Simple Calculator Open Xcode ,[object Object],Create calculator user interface (Run & Build) Add CalcBrain.h, CalcBrain.m Add setOperand and performOperation methods Edit CalcControllerView.h, CalcControllerView.m Connect the .nib file to the IBOutlet (display) & IBActions (digitPressed & operatorPressed Run & Build
Debugging:add some breakpoints & run
Simple CalculatorNext Steps … Handle operations with 2 operands “+”, “-”, “*”, “/”.  Add instance variables to CalcBrain for storing additional operand and operator. Modify performOperation method to handle another operand.
Questions?  Check out the 2012 Foothill course offerings Una Daly:    dalyuna@fhda.edu
Image Attributions Front page iPad, iPhone Some rights reserved by Yutaka Tsutano C Programming Language Some rights reserved by mrbill Java image Some rights reservedBy kathryn_rotondo Objective-C Image Some rights reserved by heipei

Contenu connexe

Tendances

Graphical User Interface Development with Eqela
Graphical User Interface Development with EqelaGraphical User Interface Development with Eqela
Graphical User Interface Development with Eqelajobandesther
 
Eqela Core API and Utilities
Eqela Core API and UtilitiesEqela Core API and Utilities
Eqela Core API and Utilitiesjobandesther
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs WorkshopRan Wahle
 
Introduction to Eqela development
Introduction to Eqela developmentIntroduction to Eqela development
Introduction to Eqela developmentjobandesther
 
Android L02 - Activities and Adapters
Android L02 - Activities and AdaptersAndroid L02 - Activities and Adapters
Android L02 - Activities and AdaptersMohammad Shaker
 
Introduction to the integral framework
Introduction to the integral frameworkIntroduction to the integral framework
Introduction to the integral frameworkKarthik Subramanian
 
Introduction to the INTEGRAL FRAMEWORK
Introduction to the INTEGRAL FRAMEWORKIntroduction to the INTEGRAL FRAMEWORK
Introduction to the INTEGRAL FRAMEWORKKarthik Subramanian
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Lars Vogel
 
Crash Course on R Shiny Package
Crash Course on R Shiny Package Crash Course on R Shiny Package
Crash Course on R Shiny Package Rohit Dubey
 
Tools and practices for rapid application development
Tools and practices for rapid application developmentTools and practices for rapid application development
Tools and practices for rapid application developmentZoltán Váradi
 
Introduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RIntroduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RPaul Richards
 
JavaScript infographic - 01
JavaScript infographic - 01JavaScript infographic - 01
JavaScript infographic - 01Asif F Kingshuk
 
iOS Beginners Lesson 2
iOS Beginners Lesson 2iOS Beginners Lesson 2
iOS Beginners Lesson 2Calvin Cheng
 
Rails VUWIT workshop
Rails VUWIT workshopRails VUWIT workshop
Rails VUWIT workshopbreccan
 
React native introduction
React native introductionReact native introduction
React native introductionInnerFood
 
Design Patterns in iOS
Design Patterns in iOSDesign Patterns in iOS
Design Patterns in iOSYi-Shou Chen
 
Cis 247 all i labs
Cis 247 all i labsCis 247 all i labs
Cis 247 all i labsccis224477
 

Tendances (20)

Graphical User Interface Development with Eqela
Graphical User Interface Development with EqelaGraphical User Interface Development with Eqela
Graphical User Interface Development with Eqela
 
Eqela Core API and Utilities
Eqela Core API and UtilitiesEqela Core API and Utilities
Eqela Core API and Utilities
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs Workshop
 
Introduction to Eqela development
Introduction to Eqela developmentIntroduction to Eqela development
Introduction to Eqela development
 
Android L02 - Activities and Adapters
Android L02 - Activities and AdaptersAndroid L02 - Activities and Adapters
Android L02 - Activities and Adapters
 
Angular2 and You
Angular2 and YouAngular2 and You
Angular2 and You
 
Introduction to the integral framework
Introduction to the integral frameworkIntroduction to the integral framework
Introduction to the integral framework
 
Introduction to the INTEGRAL FRAMEWORK
Introduction to the INTEGRAL FRAMEWORKIntroduction to the INTEGRAL FRAMEWORK
Introduction to the INTEGRAL FRAMEWORK
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
 
Crash Course on R Shiny Package
Crash Course on R Shiny Package Crash Course on R Shiny Package
Crash Course on R Shiny Package
 
Tools and practices for rapid application development
Tools and practices for rapid application developmentTools and practices for rapid application development
Tools and practices for rapid application development
 
Introduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RIntroduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in R
 
JavaScript infographic - 01
JavaScript infographic - 01JavaScript infographic - 01
JavaScript infographic - 01
 
Shiny in R
Shiny in RShiny in R
Shiny in R
 
iOS Beginners Lesson 2
iOS Beginners Lesson 2iOS Beginners Lesson 2
iOS Beginners Lesson 2
 
React-Native Lecture 11: In App Storage
React-Native Lecture 11: In App StorageReact-Native Lecture 11: In App Storage
React-Native Lecture 11: In App Storage
 
Rails VUWIT workshop
Rails VUWIT workshopRails VUWIT workshop
Rails VUWIT workshop
 
React native introduction
React native introductionReact native introduction
React native introduction
 
Design Patterns in iOS
Design Patterns in iOSDesign Patterns in iOS
Design Patterns in iOS
 
Cis 247 all i labs
Cis 247 all i labsCis 247 all i labs
Cis 247 all i labs
 

Similaire à Code camp 2011 Getting Started with IOS, Una Daly

iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1Shyamala Prayaga
 
iOS Programming - MCV (Delegate/Protocols/Property&Syntax)
iOS Programming - MCV (Delegate/Protocols/Property&Syntax)iOS Programming - MCV (Delegate/Protocols/Property&Syntax)
iOS Programming - MCV (Delegate/Protocols/Property&Syntax)Oliver Lin
 
Ios development 2
Ios development 2Ios development 2
Ios development 2elnaqah
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnetrainynovember12
 
New to native? Getting Started With iOS Development
New to native?   Getting Started With iOS DevelopmentNew to native?   Getting Started With iOS Development
New to native? Getting Started With iOS DevelopmentGeoffrey Goetz
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Maarten Balliauw
 
.NET Portfolio
.NET Portfolio.NET Portfolio
.NET Portfoliomwillmer
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Mikkel Flindt Heisterberg
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart JfokusLars Vogel
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applicationsIvano Malavolta
 
Tell Me Quando - Implementing Feature Flags
Tell Me Quando - Implementing Feature FlagsTell Me Quando - Implementing Feature Flags
Tell Me Quando - Implementing Feature FlagsJorge Ortiz
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Jonas Follesø
 
iOS overview
iOS overviewiOS overview
iOS overviewgupta25
 

Similaire à Code camp 2011 Getting Started with IOS, Una Daly (20)

iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1
 
iOS Programming - MCV (Delegate/Protocols/Property&Syntax)
iOS Programming - MCV (Delegate/Protocols/Property&Syntax)iOS Programming - MCV (Delegate/Protocols/Property&Syntax)
iOS Programming - MCV (Delegate/Protocols/Property&Syntax)
 
Ios development 2
Ios development 2Ios development 2
Ios development 2
 
Hello world ios v1
Hello world ios v1Hello world ios v1
Hello world ios v1
 
JAX 08 - Agile RCP
JAX 08 - Agile RCPJAX 08 - Agile RCP
JAX 08 - Agile RCP
 
02 objective-c session 2
02  objective-c session 202  objective-c session 2
02 objective-c session 2
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
 
New to native? Getting Started With iOS Development
New to native?   Getting Started With iOS DevelopmentNew to native?   Getting Started With iOS Development
New to native? Getting Started With iOS Development
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
 
.NET Portfolio
.NET Portfolio.NET Portfolio
.NET Portfolio
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
 
Tell Me Quando - Implementing Feature Flags
Tell Me Quando - Implementing Feature FlagsTell Me Quando - Implementing Feature Flags
Tell Me Quando - Implementing Feature Flags
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
iOS overview
iOS overviewiOS overview
iOS overview
 
myslide1
myslide1myslide1
myslide1
 
myslide6
myslide6myslide6
myslide6
 
NewSeriesSlideShare
NewSeriesSlideShareNewSeriesSlideShare
NewSeriesSlideShare
 

Plus de Una Daly

CCCOER Presents: Models for Transforming Cassrooms to be Equitable and Antira...
CCCOER Presents: Models for Transforming Cassrooms to be Equitable and Antira...CCCOER Presents: Models for Transforming Cassrooms to be Equitable and Antira...
CCCOER Presents: Models for Transforming Cassrooms to be Equitable and Antira...Una Daly
 
CCCOER Presents: Professional Development Resources for OER Adoption and Crea...
CCCOER Presents: Professional Development Resources for OER Adoption and Crea...CCCOER Presents: Professional Development Resources for OER Adoption and Crea...
CCCOER Presents: Professional Development Resources for OER Adoption and Crea...Una Daly
 
K-12 and Community Colleges Collaborations on OER
K-12 and Community Colleges Collaborations on OERK-12 and Community Colleges Collaborations on OER
K-12 and Community Colleges Collaborations on OERUna Daly
 
Open for AntiRacism: The Math Equity Toolkit
Open for AntiRacism: The Math Equity ToolkitOpen for AntiRacism: The Math Equity Toolkit
Open for AntiRacism: The Math Equity ToolkitUna Daly
 
CCCOER Presents: Inclusive Course Design and Materials
CCCOER Presents: Inclusive Course Design and MaterialsCCCOER Presents: Inclusive Course Design and Materials
CCCOER Presents: Inclusive Course Design and MaterialsUna Daly
 
Integrating Antiracist Pedagogy into Your Classroom
Integrating Antiracist Pedagogy into Your ClassroomIntegrating Antiracist Pedagogy into Your Classroom
Integrating Antiracist Pedagogy into Your ClassroomUna Daly
 
CCCOER Presents: Navigating the Virtual Open Education Conferences
CCCOER Presents: Navigating the Virtual Open Education ConferencesCCCOER Presents: Navigating the Virtual Open Education Conferences
CCCOER Presents: Navigating the Virtual Open Education ConferencesUna Daly
 
CCCOER Presents: Culture Shift to Academic Freedom
CCCOER Presents: Culture Shift to Academic FreedomCCCOER Presents: Culture Shift to Academic Freedom
CCCOER Presents: Culture Shift to Academic FreedomUna Daly
 
Reducing Equity Gaps & Creating Reliency with OER
Reducing Equity Gaps & Creating Reliency with OERReducing Equity Gaps & Creating Reliency with OER
Reducing Equity Gaps & Creating Reliency with OERUna Daly
 
CCCOER Presents: Decolonizing The Course
CCCOER Presents: Decolonizing The CourseCCCOER Presents: Decolonizing The Course
CCCOER Presents: Decolonizing The CourseUna Daly
 
California ZTC Degrees Panel: Past, Present, and Future
California ZTC Degrees Panel: Past, Present, and FutureCalifornia ZTC Degrees Panel: Past, Present, and Future
California ZTC Degrees Panel: Past, Present, and FutureUna Daly
 
Introduction to OER with CCCOER
Introduction to OER with CCCOERIntroduction to OER with CCCOER
Introduction to OER with CCCOERUna Daly
 
CCCOER Presents: User Friendly OER Course Design for Remote and F2F Learning
CCCOER Presents: User Friendly OER Course Design for Remote and F2F LearningCCCOER Presents: User Friendly OER Course Design for Remote and F2F Learning
CCCOER Presents: User Friendly OER Course Design for Remote and F2F LearningUna Daly
 
Open Education Resilience in Crisis and Beyond
Open Education Resilience in Crisis and BeyondOpen Education Resilience in Crisis and Beyond
Open Education Resilience in Crisis and BeyondUna Daly
 
Faculty and Students Share about Open Pedagogy
Faculty and Students Share about Open PedagogyFaculty and Students Share about Open Pedagogy
Faculty and Students Share about Open PedagogyUna Daly
 
Open Education Week: Students and OER Advocacy
Open Education Week: Students and OER AdvocacyOpen Education Week: Students and OER Advocacy
Open Education Week: Students and OER AdvocacyUna Daly
 
CCCOER Presents: Regional Leaders of Open Education
CCCOER Presents: Regional Leaders of Open EducationCCCOER Presents: Regional Leaders of Open Education
CCCOER Presents: Regional Leaders of Open EducationUna Daly
 
Beginning to Open Up: Ideas for Colleges Early in their OER Journey
Beginning to Open Up: Ideas for Colleges Early in their OER JourneyBeginning to Open Up: Ideas for Colleges Early in their OER Journey
Beginning to Open Up: Ideas for Colleges Early in their OER JourneyUna Daly
 
Arizona OER Summit: Connections to Sustain and Grow Open Education
Arizona OER Summit: Connections to Sustain and Grow Open EducationArizona OER Summit: Connections to Sustain and Grow Open Education
Arizona OER Summit: Connections to Sustain and Grow Open EducationUna Daly
 
CCCOER Presents: Attributions. Authoring, and OER Platforms
CCCOER Presents: Attributions. Authoring, and OER PlatformsCCCOER Presents: Attributions. Authoring, and OER Platforms
CCCOER Presents: Attributions. Authoring, and OER PlatformsUna Daly
 

Plus de Una Daly (20)

CCCOER Presents: Models for Transforming Cassrooms to be Equitable and Antira...
CCCOER Presents: Models for Transforming Cassrooms to be Equitable and Antira...CCCOER Presents: Models for Transforming Cassrooms to be Equitable and Antira...
CCCOER Presents: Models for Transforming Cassrooms to be Equitable and Antira...
 
CCCOER Presents: Professional Development Resources for OER Adoption and Crea...
CCCOER Presents: Professional Development Resources for OER Adoption and Crea...CCCOER Presents: Professional Development Resources for OER Adoption and Crea...
CCCOER Presents: Professional Development Resources for OER Adoption and Crea...
 
K-12 and Community Colleges Collaborations on OER
K-12 and Community Colleges Collaborations on OERK-12 and Community Colleges Collaborations on OER
K-12 and Community Colleges Collaborations on OER
 
Open for AntiRacism: The Math Equity Toolkit
Open for AntiRacism: The Math Equity ToolkitOpen for AntiRacism: The Math Equity Toolkit
Open for AntiRacism: The Math Equity Toolkit
 
CCCOER Presents: Inclusive Course Design and Materials
CCCOER Presents: Inclusive Course Design and MaterialsCCCOER Presents: Inclusive Course Design and Materials
CCCOER Presents: Inclusive Course Design and Materials
 
Integrating Antiracist Pedagogy into Your Classroom
Integrating Antiracist Pedagogy into Your ClassroomIntegrating Antiracist Pedagogy into Your Classroom
Integrating Antiracist Pedagogy into Your Classroom
 
CCCOER Presents: Navigating the Virtual Open Education Conferences
CCCOER Presents: Navigating the Virtual Open Education ConferencesCCCOER Presents: Navigating the Virtual Open Education Conferences
CCCOER Presents: Navigating the Virtual Open Education Conferences
 
CCCOER Presents: Culture Shift to Academic Freedom
CCCOER Presents: Culture Shift to Academic FreedomCCCOER Presents: Culture Shift to Academic Freedom
CCCOER Presents: Culture Shift to Academic Freedom
 
Reducing Equity Gaps & Creating Reliency with OER
Reducing Equity Gaps & Creating Reliency with OERReducing Equity Gaps & Creating Reliency with OER
Reducing Equity Gaps & Creating Reliency with OER
 
CCCOER Presents: Decolonizing The Course
CCCOER Presents: Decolonizing The CourseCCCOER Presents: Decolonizing The Course
CCCOER Presents: Decolonizing The Course
 
California ZTC Degrees Panel: Past, Present, and Future
California ZTC Degrees Panel: Past, Present, and FutureCalifornia ZTC Degrees Panel: Past, Present, and Future
California ZTC Degrees Panel: Past, Present, and Future
 
Introduction to OER with CCCOER
Introduction to OER with CCCOERIntroduction to OER with CCCOER
Introduction to OER with CCCOER
 
CCCOER Presents: User Friendly OER Course Design for Remote and F2F Learning
CCCOER Presents: User Friendly OER Course Design for Remote and F2F LearningCCCOER Presents: User Friendly OER Course Design for Remote and F2F Learning
CCCOER Presents: User Friendly OER Course Design for Remote and F2F Learning
 
Open Education Resilience in Crisis and Beyond
Open Education Resilience in Crisis and BeyondOpen Education Resilience in Crisis and Beyond
Open Education Resilience in Crisis and Beyond
 
Faculty and Students Share about Open Pedagogy
Faculty and Students Share about Open PedagogyFaculty and Students Share about Open Pedagogy
Faculty and Students Share about Open Pedagogy
 
Open Education Week: Students and OER Advocacy
Open Education Week: Students and OER AdvocacyOpen Education Week: Students and OER Advocacy
Open Education Week: Students and OER Advocacy
 
CCCOER Presents: Regional Leaders of Open Education
CCCOER Presents: Regional Leaders of Open EducationCCCOER Presents: Regional Leaders of Open Education
CCCOER Presents: Regional Leaders of Open Education
 
Beginning to Open Up: Ideas for Colleges Early in their OER Journey
Beginning to Open Up: Ideas for Colleges Early in their OER JourneyBeginning to Open Up: Ideas for Colleges Early in their OER Journey
Beginning to Open Up: Ideas for Colleges Early in their OER Journey
 
Arizona OER Summit: Connections to Sustain and Grow Open Education
Arizona OER Summit: Connections to Sustain and Grow Open EducationArizona OER Summit: Connections to Sustain and Grow Open Education
Arizona OER Summit: Connections to Sustain and Grow Open Education
 
CCCOER Presents: Attributions. Authoring, and OER Platforms
CCCOER Presents: Attributions. Authoring, and OER PlatformsCCCOER Presents: Attributions. Authoring, and OER Platforms
CCCOER Presents: Attributions. Authoring, and OER Platforms
 

Dernier

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 

Dernier (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 

Code camp 2011 Getting Started with IOS, Una Daly

  • 1. Getting Started with iOSProgramming Code Camp Oct 2011 Una Daly
  • 2. Una Daly Foothill College Instructor (adjunct) Director, College Open Textbooks Apple Software Engineer & Manager 10 years Networking Software Engineer
  • 3. Audience Experience C, C++ Java Objective-C
  • 4. Agenda Getting Starting Slides: 20-25 minutes Download the iOS SDK Setup your development environment Brief overview of the iPhone OS architecture Tools: Xcode, Interface Builder, iOS Simulator, and Instruments Objective-C syntax   Hello Coders (explain tools for real here) - 10 minutes Add a custom icon - 5 minutes    Model-View-Controller – 5 minutes   MyCalc (implementation) - 15 minutes
  • 5. The iOS Journey Register as Apple Developer Read Getting Started Documentation Download SDK Start project Join iOS Developer $99 OR Take Foothill Class • Submit to AppStore Some rights reserved cc-by-nc-sa by airdiogo
  • 7. iOS ArchitectureCore OS OSX Kernel Mach 3.0 BSD Sockets Security Power Management Keychain Access Certificates File System Bonjour
  • 8. iOS ArchitectureCore Services Collections Address Book Networking File Access SQLite Core Location Net Services Threading Preferences URL Utilities
  • 9. iOS ArchitectureMedia Core Audio OpenAL Audio Mixing Audio Recording Video Playback JPEG, PNG, TIFF PDF Quartz (2D) Core Animation OpenGL ES
  • 10. iOS ArchitectureCocoa Touch Multi-Touch Core Motion View Hierarchy Localization Controls Alerts Web View Map Kit Image Picker Camera
  • 11. iOS Platform Tools : Xcode, Interface Builder, Instruments Language: Objective- C [object message: arg] Frameworks : Foundation, UIKit, CoreGrapics Design Strategy: Model-View-Controller
  • 12. iOS ToolsIntegrated Development Environment (Mac OS X) Xcode Interface Builder Simulator Instruments
  • 13. Main iOS Frameworks Foundation (NextStep) NSObject, NSString, NSArrays, NSDictionaries, etc. UIKit Views, Windows, etc … (.xib files) Core Graphics Drawing intensive apps only
  • 14. Objective-C Object-oriented language C Programming Language Dynamic runtime environment Java-like method selection
  • 15. Objective-C Classes Objective-C source code files .h -- interface files .m – implementation files
  • 16. Objective-C Scope Accessing instance variables @private - only class can access @protected – only class and subclass (default) @public - any class can access General rule of thumb … Make all instance variables private and use the properties directive to generate getter and setters.
  • 17. Method syntax (NSString *) foo : (int) zap bar : (double) pow; • Method name is “foo:bar:” • It has two arguments: int zap; double pow; • Return type is NSStringof Foundation class
  • 18. Sending Messages Dynamically dispatched by runtime Method name (selector) decoupled from code Runtime dynamically looks up to find method
  • 19. Class Instantiationsimple case alloc init release
  • 20. Model-View-Controller Model is data engine View is user interface Controller is bridge between model & view Sets view (instance variables) Outlets Receives Actions (user input) from View Formats model’s data for display in view Controller Model View
  • 21. Actions & Outlets Connecting objects to UI Views Views send IBActions to Controller btnClicked Controllers talk to view through IBOutlets txtFieldName
  • 22. Our First ProjectHello Coders • Launch Xcode Create a “View” project called HelloCoders Look at the files created by default HelloCodersAppDelegate.h (Objective C) HelloCodersAppDelegate.m HelloCodersViewController.h HelloCodersViewController.m HelloCodersViewController.xib Click on Run to build and launch app So we have a blank screen – not too interesting
  • 23. Hello Coderscontd. Click on HelloCodersViewController.xib to launch Interface Builder. Called the nib file and contains an XML description of your user interface. Three items appear File Owner – runtime object that owns the nib First Responder – first view in the chain to respond to events. View window shows the graphical layout
  • 24. Let’s add some UI elements Open the Objects Library (View->Utilities) Choose a label and drag onto window Double click and type “Hello Coders” Tools->Attribute Inspector and type “Hello Coders” Change alignment, font size etc from attribute window. Drag & drop a Text Field view to the View Window Drag & drop a Button view to the View Window Tools->Attribute and type “Click Me!” in button title Save .xib file and Run
  • 25. What does the .xib file look like?
  • 26. Run the User Interface Launch the app Try typing into text field. Keyboard appears Click in and out of your app using home key. Time to implement action in code Add btnClicked method and txtName instance variable declaration in HelloCodersViewController. h file. Write btnClicked method to display an alert in the Hello CodersViewController.m file. Now Run your app again …. What’s Missing???
  • 27. Connect Action and Outlet Open the .nib file Control click the button to the File Owner Select btnClicked Control click the File Owner to the textfield Select txtname Save, Build & Run … YES ….
  • 28. Add a custom icon for your app Let’s make the application prettier Icons for iPhone apps are 57x57 Icons for iPads are 72x72 Icons for high-resolution iPhones are 114x114 Drag & Drop icon onto Support folder of your project. Make a copy if asked. Select the HelloCoders-Info.plist in the Support Folder. Select the icon file item and set its value to the name of the icon file. 3. Choose Run and watch your application launch this time.
  • 29. Simulator running our Appwith app icon
  • 30. Model-View-ControllerReview Model is data engine View is user interface Controller is bridge between model & view Sets view instance vars Receives Actions from View Formats model’s data for display in view Controller Model View
  • 31. Simple CalculatorModel-View-Controller CalcViewController Get Actions from View Call Brain to do Math Update View with Results CalcBrain Do the Math here!!! Sqrt Inverse Clear CalcView Display IBOutlet Buttons IBAction 1,2,3,4, 5, 6, 7,8,9 sqrt, 1/x, clr
  • 32. Simple Calculator User Interface (.xib) file
  • 33.
  • 35. Simple CalculatorNext Steps … Handle operations with 2 operands “+”, “-”, “*”, “/”. Add instance variables to CalcBrain for storing additional operand and operator. Modify performOperation method to handle another operand.
  • 36. Questions? Check out the 2012 Foothill course offerings Una Daly: dalyuna@fhda.edu
  • 37. Image Attributions Front page iPad, iPhone Some rights reserved by Yutaka Tsutano C Programming Language Some rights reserved by mrbill Java image Some rights reservedBy kathryn_rotondo Objective-C Image Some rights reserved by heipei