SlideShare a Scribd company logo
1 of 63
New to Native?
Getting Started with iOS Development
@ggeoffreggeoffre.com
20 years of experience in the development, marketing,
sales, and leadership of computer software
A C T S
Before you do anything…
Search Google for…
“Apple Mobile HIG”
Apple’s Mobile Human Interface Guidelines
developer.apple.com/library/ios/doc
umentation/UserExperience/Concep
tual/MobileHIG/
Popover
TableView
Using Xcode
Step One - Get a Mac, any Mac
Step Two - Get Xcode
Download the free version of Xcode from the app
store
Create a free developer account and download
Xcode
developer.apple.com
Register your company and pay for a developer
account to download Xcode betas
Creating a new project
Master Detail
Master Detail
Page Based
Page Based
Tabbed
Tabbed
Toolbar - Run, Stop, Show, Hide
Navigation - Project, Symbol, Find, Issue, Test, Debug,
Breakpoint, Report
Editors - Source, Interface Builder, Project
Debugger - Stack Viewer, Output Console
Inspector/Library - File, Help, Code, Object, Media
The Basics of Xcode
The Basics of Xcode
The Basics of Xcode
The Basics of Xcode
Working with the UILabel
Drag and drop the object in IB onto the view
Working with the UILabel
Connect the object in IB to Code
Working with the UIButton
Drag and drop the object in IB onto the view
Working with the UIButton
Connect the object in IB to Code
Working with the UIButton
Create an action for the object
Working with the
UITextView
Drag and drop the object in IB onto the view
Working with the
UITextView
Connect the object in IB to Code
Working with the
UITextView
Add the delegate interface to the View
Working with the
UITextView
Set the objects delegate as the view
Working with the
UITextView
Control the keyboard
//make the keyboard display
[textField becomeFirstResponder];
//make the keyboard hide
[textField resignFirstResponder];
Working with the
UITextView
Implement optional delegate methods
//Dismiss the keyboard when the return key is tapped
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
if (textField == self.someTextfield) {
[textField resignFirstResponder];
return NO;
}
return YES;
}
//Only allow numeric characters
- (BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range
replacementString:(NSString *)newString
{
NSCharacterSet* notNumbers =
[[NSCharacterSet characterSetWithCharactersInString:@"0123456789"]
invertedSet];
NSUInteger location = [newString rangeOfCharacterFromSet:notNumbers].location;
return ( location == NSNotFound );
}
Managing Editing
textFieldShouldBeginEditing:
textFieldDidBeginEditing:
textFieldShouldEndEditing:
textFieldDidEndEditing:
Editing the Text Field’s Text
textField:shouldChangeCharactersInRange:replacementString:
textFieldShouldClear:
textFieldShouldReturn:
Working with the
UITextView
Review: Working with the…
UILabel UIButton UITextField
Working with the UILabel
Drag and drop the object in IB onto the view
Connect the object in IB to Code
Working with the UIButton
Drag and drop the object in IB onto the view
Connect the object in IB to Code
Create an action for the object
Working with the
UITextView
Drag and drop the object in IB onto the view
Connect the object in IB to Code
Add the delegate interface to the View
Set the objects delegate as the view
Implement optional delegate methods
Debugging in the Simulator
Managing Devices
Debugging in the Simulator
Reseting the Simulator
Debugging in the Simulator
Toggle, Run, Step Over, Step Into, Step Out
float someFloat = 1.2345;
int someInteger = 6;
NSString *someString = @"Seven";
NSLog(@"Some Float: %f Some Integer: %i Some String: %@“
, someFloat, someInteger, someString);
Technical Note TN2347
Logging console messages
Debugging in the Simulator
Working with Colors
Use the
Color Picker
To save your
color choices
Working with Colors
Add the UIKit Framework
to your project
Working with Colors
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface UIColor (My)
+(UIColor *) MyOffWhiteColor;
@end
@interface UIFont (My)
+(UIFont *) MyLightFontWithFontSize:(float)fontSize;
@end
#import "MyColorsAndFonts.h"
@implementation UIColor (My)
+(UIColor *) MyOffWhiteColor { return [UIColor colorWithRed: 252.0/255.0 green: 251.0/255.0 blue:
247.0/255.0 alpha: 1.0]; };
@end
@implementation UIFont (My)
+(UIFont *) MyLightFontWithFontSize:(float)fontSize { return [UIFont fontWithName:@"HelveticaNeue-
Light" size:fontSize]; }
@end
Create a custom
Color and Font
Class
Working with Colors
http://www.javascripter.net/faq/hextorgb.htm
Color Sync Utility
Digital Color Meter
Hex-to-RGB Conversion
Transitons Animations
Disable Auto Layout
on the View
Working with the UILabel
Connect the object in IB to Code
Transitons Animations
[UIView animateWithDuration:3.0 animations:^{
[self.someLabel setAlpha:1.0];
}];
Write Some Code
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:500.0f
initialSpringVelocity:0.0f
options:UIViewAnimationOptionCurveLinear
animations:^{
[self.someLabel setAlpha:1.0];
}completion:^{
[self doSomething];
}];
[self.view setNeedsUpdateConstraints];
[UIView animateWithDuration:3.0 animations:^{
[self.someLabel setAlpha:1.0];
[self.view layoutIfNeeded];
}];
UIAlertView and its
Delegate
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:
@"Some Title" message:@"Some Alert”
delegate:self
cancelButtonTitle:@“Cancel"
otherButtonTitles:@"Ok", nil];
[alertView show];
Display an Alert
- (void)alertView:(UIAlertView *)alertView
clickedButtonAtIndex: (NSInteger)buttonIndex{
switch (buttonIndex) {
case 0:
NSLog(@"Cancel");
break;
case 1:
NSLog(@"OK");
break;
default:
break;
}
}
Respond to an Alert
Storyboards and Nibs (Xibs)
Nibs and Xibs are the same
“N” is for NeXt, “ib” is for Interface Builder
“X” is for XML, “ib” is for Interface Builder
One .xib file for one
Storyboards are like Xibs for multiple UIView
Controllers
Creating a new Xib
Creating a new Storyboard
Binding in Interface Builder
Select the ViewController in
Interface Builder
Navigate to the Identity Inspector
Set the Custom Class Name
Set the Storyboard ID
Storyboards and Nibs (Xibs)
Creating a UIViewController from a Storyboard
Creating a UIViewController from a Nib (Xib)
SomeViewController* someViewController =
[self.storyboard instantiateViewControllerWithIdentifier:@“SomeView"];
[[self navigationController]
presentViewController:someViewController animated:YES completion:nil];
SomeViewController* someViewController =
[[SomeViewController alloc] initWithNibName:@"SomeViewController" bundle:nil];
[[self navigationController]
presentViewController:someViewController animated:YES completion:nil];
Multiple Storyboards
One “Shared” Storyboard
Multiple Storyboards
SomeViewController* someViewController =
[self.storyboard instantiateViewControllerWithIdentifier:@“SomeView"];
[[self navigationController]
presentViewController:someViewController animated:YES completion:nil];
UIStoryboard *someStoryboard =
[UIStoryboard storyboardWithName:@"SomeStoryboard" bundle:nil];
SomeViewController* someViewController =
[someStoryboard instantiateViewControllerWithIdentifier:@“SomeView"];
[[self navigationController]
presentViewController:someViewController animated:YES completion:nil];
Debugging on a device
Enable Mac to be in “Development
Mode”
Create Developer Account and
Provisioning Profile
Add your device to your account (hard
limit of 100 devices)
developer.apple.com
Provisioning Test Devices
Create a Provisioning Profile
Download and install Certificates
Build and Deploy Xcode Archives
Provisioning Test Devices
Tools
Xcode Organizer for iOS Devices and Profiles
ADC Development Provisioning Portal
ADC Development Provisioning Assistant
Certificates
WWDR Intermediate Certificate
Developer Certificate
Provisioning Profile Certificate
ADC iOS Provisioning
Portal Manually Manage
Devices
Developers
Profiles
App IDs
Debugging on a device
Log on with your
Apple ID to your
Apple Developer
Account
Managing Devices
Debugging on a device
Attach the Device
to your Mac
Debugging on a device
Check the Project Settings
• Bundle Identifier
• Team Provisioning Profile
• Deployment Target
Select the Device
and Run
Debugging on a device
airserver.com
airsquirrels.com
When Things Go Wrong...
Technical Note TN2250 - Understanding and
Resolving Code Signing Issues
TestFlight Distribution
https://testflightapp.com/
TestFlight Distribution
Setup a free TestFlight account and create a team.
Invite and gather the UDIDs from the team members.
Add devices to your ADC Provisioning Profile.
Build an .ipa archive in Xcode and upload to
TestFlight.
Distribute the build and manage the feedback.
TestFlight Distribution
New to native?   Getting Started With iOS Development

More Related Content

What's hot

jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptjQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
Philipp Bosch
 
Develop your first mobile App for iOS and Android
Develop your first mobile App for iOS and AndroidDevelop your first mobile App for iOS and Android
Develop your first mobile App for iOS and Android
ralcocer
 
iTunes App Store Submission Process
iTunes App Store Submission ProcessiTunes App Store Submission Process
iTunes App Store Submission Process
Anscamobile
 

What's hot (19)

Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
Robotium Tutorial
Robotium TutorialRobotium Tutorial
Robotium Tutorial
 
Using API Platform to build ticketing system #symfonycon
Using API Platform to build ticketing system #symfonyconUsing API Platform to build ticketing system #symfonycon
Using API Platform to build ticketing system #symfonycon
 
Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)
 
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptjQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Robotium at Android Only 2010-09-29
Robotium at Android Only 2010-09-29Robotium at Android Only 2010-09-29
Robotium at Android Only 2010-09-29
 
Develop your first mobile App for iOS and Android
Develop your first mobile App for iOS and AndroidDevelop your first mobile App for iOS and Android
Develop your first mobile App for iOS and Android
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
Testdroid:
Testdroid: Testdroid:
Testdroid:
 
Android Test Automation Workshop
Android Test Automation WorkshopAndroid Test Automation Workshop
Android Test Automation Workshop
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
 
Android programming-basics
Android programming-basicsAndroid programming-basics
Android programming-basics
 
iTunes App Store Submission Process
iTunes App Store Submission ProcessiTunes App Store Submission Process
iTunes App Store Submission Process
 
Testing android apps with espresso
Testing android apps with espressoTesting android apps with espresso
Testing android apps with espresso
 
Android studio
Android studioAndroid studio
Android studio
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
 

Similar to New to native? Getting Started With iOS Development

Quick Start to iOS Development
Quick Start to iOS DevelopmentQuick Start to iOS Development
Quick Start to iOS Development
Jussi Pohjolainen
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
Vu Tran Lam
 
iOS App Development with Storyboard
iOS App Development with StoryboardiOS App Development with Storyboard
iOS App Development with Storyboard
Babul Mirdha
 
Session 210 _accessibility_for_ios
Session 210 _accessibility_for_iosSession 210 _accessibility_for_ios
Session 210 _accessibility_for_ios
cheinyeanlim
 

Similar to New to native? Getting Started With iOS Development (20)

Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una Daly
 
Hello world ios v1
Hello world ios v1Hello world ios v1
Hello world ios v1
 
IOS Storyboards
IOS StoryboardsIOS Storyboards
IOS Storyboards
 
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
 
iOS
iOSiOS
iOS
 
Quick Start to iOS Development
Quick Start to iOS DevelopmentQuick Start to iOS Development
Quick Start to iOS Development
 
iPhone SDK dev sharing - the very basics
iPhone SDK dev sharing - the very basicsiPhone SDK dev sharing - the very basics
iPhone SDK dev sharing - the very basics
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
iOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET GuyiOS Development Survival Guide for the .NET Guy
iOS Development Survival Guide for the .NET Guy
 
iOS_Presentation
iOS_PresentationiOS_Presentation
iOS_Presentation
 
IOS APPs Revision
IOS APPs RevisionIOS APPs Revision
IOS APPs Revision
 
How To Build iOS Apps Without interface Builder
How To Build iOS Apps Without interface BuilderHow To Build iOS Apps Without interface Builder
How To Build iOS Apps Without interface Builder
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
 
Presentation
PresentationPresentation
Presentation
 
iOS App Development with Storyboard
iOS App Development with StoryboardiOS App Development with Storyboard
iOS App Development with Storyboard
 
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
 
Session 210 _accessibility_for_ios
Session 210 _accessibility_for_iosSession 210 _accessibility_for_ios
Session 210 _accessibility_for_ios
 
IBDesignable - CocoaConf Seattle 2014
IBDesignable - CocoaConf Seattle 2014IBDesignable - CocoaConf Seattle 2014
IBDesignable - CocoaConf Seattle 2014
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

New to native? Getting Started With iOS Development

  • 1. New to Native? Getting Started with iOS Development
  • 2. @ggeoffreggeoffre.com 20 years of experience in the development, marketing, sales, and leadership of computer software A C T S
  • 3. Before you do anything… Search Google for… “Apple Mobile HIG” Apple’s Mobile Human Interface Guidelines developer.apple.com/library/ios/doc umentation/UserExperience/Concep tual/MobileHIG/
  • 5. Using Xcode Step One - Get a Mac, any Mac Step Two - Get Xcode Download the free version of Xcode from the app store Create a free developer account and download Xcode developer.apple.com Register your company and pay for a developer account to download Xcode betas
  • 6. Creating a new project
  • 13. Toolbar - Run, Stop, Show, Hide Navigation - Project, Symbol, Find, Issue, Test, Debug, Breakpoint, Report Editors - Source, Interface Builder, Project Debugger - Stack Viewer, Output Console Inspector/Library - File, Help, Code, Object, Media The Basics of Xcode
  • 14. The Basics of Xcode
  • 15. The Basics of Xcode
  • 16. The Basics of Xcode
  • 17. Working with the UILabel Drag and drop the object in IB onto the view
  • 18. Working with the UILabel Connect the object in IB to Code
  • 19. Working with the UIButton Drag and drop the object in IB onto the view
  • 20. Working with the UIButton Connect the object in IB to Code
  • 21. Working with the UIButton Create an action for the object
  • 22. Working with the UITextView Drag and drop the object in IB onto the view
  • 23. Working with the UITextView Connect the object in IB to Code
  • 24. Working with the UITextView Add the delegate interface to the View
  • 25. Working with the UITextView Set the objects delegate as the view
  • 26. Working with the UITextView Control the keyboard //make the keyboard display [textField becomeFirstResponder]; //make the keyboard hide [textField resignFirstResponder];
  • 27. Working with the UITextView Implement optional delegate methods //Dismiss the keyboard when the return key is tapped - (BOOL)textFieldShouldReturn:(UITextField *)textField { if (textField == self.someTextfield) { [textField resignFirstResponder]; return NO; } return YES; } //Only allow numeric characters - (BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)newString { NSCharacterSet* notNumbers = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789"] invertedSet]; NSUInteger location = [newString rangeOfCharacterFromSet:notNumbers].location; return ( location == NSNotFound ); }
  • 28. Managing Editing textFieldShouldBeginEditing: textFieldDidBeginEditing: textFieldShouldEndEditing: textFieldDidEndEditing: Editing the Text Field’s Text textField:shouldChangeCharactersInRange:replacementString: textFieldShouldClear: textFieldShouldReturn: Working with the UITextView
  • 29. Review: Working with the… UILabel UIButton UITextField
  • 30. Working with the UILabel Drag and drop the object in IB onto the view Connect the object in IB to Code
  • 31. Working with the UIButton Drag and drop the object in IB onto the view Connect the object in IB to Code Create an action for the object
  • 32. Working with the UITextView Drag and drop the object in IB onto the view Connect the object in IB to Code Add the delegate interface to the View Set the objects delegate as the view Implement optional delegate methods
  • 33. Debugging in the Simulator Managing Devices
  • 34. Debugging in the Simulator Reseting the Simulator
  • 35. Debugging in the Simulator Toggle, Run, Step Over, Step Into, Step Out
  • 36. float someFloat = 1.2345; int someInteger = 6; NSString *someString = @"Seven"; NSLog(@"Some Float: %f Some Integer: %i Some String: %@“ , someFloat, someInteger, someString); Technical Note TN2347 Logging console messages Debugging in the Simulator
  • 37. Working with Colors Use the Color Picker To save your color choices
  • 38. Working with Colors Add the UIKit Framework to your project
  • 39. Working with Colors #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> @interface UIColor (My) +(UIColor *) MyOffWhiteColor; @end @interface UIFont (My) +(UIFont *) MyLightFontWithFontSize:(float)fontSize; @end #import "MyColorsAndFonts.h" @implementation UIColor (My) +(UIColor *) MyOffWhiteColor { return [UIColor colorWithRed: 252.0/255.0 green: 251.0/255.0 blue: 247.0/255.0 alpha: 1.0]; }; @end @implementation UIFont (My) +(UIFont *) MyLightFontWithFontSize:(float)fontSize { return [UIFont fontWithName:@"HelveticaNeue- Light" size:fontSize]; } @end Create a custom Color and Font Class
  • 40. Working with Colors http://www.javascripter.net/faq/hextorgb.htm Color Sync Utility Digital Color Meter Hex-to-RGB Conversion
  • 42. Working with the UILabel Connect the object in IB to Code
  • 43. Transitons Animations [UIView animateWithDuration:3.0 animations:^{ [self.someLabel setAlpha:1.0]; }]; Write Some Code [UIView animateWithDuration:0.5 delay:0 usingSpringWithDamping:500.0f initialSpringVelocity:0.0f options:UIViewAnimationOptionCurveLinear animations:^{ [self.someLabel setAlpha:1.0]; }completion:^{ [self doSomething]; }]; [self.view setNeedsUpdateConstraints]; [UIView animateWithDuration:3.0 animations:^{ [self.someLabel setAlpha:1.0]; [self.view layoutIfNeeded]; }];
  • 44. UIAlertView and its Delegate UIAlertView *alertView = [[UIAlertView alloc]initWithTitle: @"Some Title" message:@"Some Alert” delegate:self cancelButtonTitle:@“Cancel" otherButtonTitles:@"Ok", nil]; [alertView show]; Display an Alert - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex{ switch (buttonIndex) { case 0: NSLog(@"Cancel"); break; case 1: NSLog(@"OK"); break; default: break; } } Respond to an Alert
  • 45. Storyboards and Nibs (Xibs) Nibs and Xibs are the same “N” is for NeXt, “ib” is for Interface Builder “X” is for XML, “ib” is for Interface Builder One .xib file for one Storyboards are like Xibs for multiple UIView Controllers
  • 47. Creating a new Storyboard
  • 48. Binding in Interface Builder Select the ViewController in Interface Builder Navigate to the Identity Inspector Set the Custom Class Name Set the Storyboard ID
  • 49. Storyboards and Nibs (Xibs) Creating a UIViewController from a Storyboard Creating a UIViewController from a Nib (Xib) SomeViewController* someViewController = [self.storyboard instantiateViewControllerWithIdentifier:@“SomeView"]; [[self navigationController] presentViewController:someViewController animated:YES completion:nil]; SomeViewController* someViewController = [[SomeViewController alloc] initWithNibName:@"SomeViewController" bundle:nil]; [[self navigationController] presentViewController:someViewController animated:YES completion:nil];
  • 50. Multiple Storyboards One “Shared” Storyboard Multiple Storyboards SomeViewController* someViewController = [self.storyboard instantiateViewControllerWithIdentifier:@“SomeView"]; [[self navigationController] presentViewController:someViewController animated:YES completion:nil]; UIStoryboard *someStoryboard = [UIStoryboard storyboardWithName:@"SomeStoryboard" bundle:nil]; SomeViewController* someViewController = [someStoryboard instantiateViewControllerWithIdentifier:@“SomeView"]; [[self navigationController] presentViewController:someViewController animated:YES completion:nil];
  • 51. Debugging on a device Enable Mac to be in “Development Mode” Create Developer Account and Provisioning Profile Add your device to your account (hard limit of 100 devices) developer.apple.com
  • 52. Provisioning Test Devices Create a Provisioning Profile Download and install Certificates Build and Deploy Xcode Archives
  • 53. Provisioning Test Devices Tools Xcode Organizer for iOS Devices and Profiles ADC Development Provisioning Portal ADC Development Provisioning Assistant Certificates WWDR Intermediate Certificate Developer Certificate Provisioning Profile Certificate
  • 54. ADC iOS Provisioning Portal Manually Manage Devices Developers Profiles App IDs
  • 55. Debugging on a device Log on with your Apple ID to your Apple Developer Account
  • 56. Managing Devices Debugging on a device Attach the Device to your Mac
  • 57. Debugging on a device Check the Project Settings • Bundle Identifier • Team Provisioning Profile • Deployment Target Select the Device and Run
  • 58. Debugging on a device airserver.com airsquirrels.com
  • 59. When Things Go Wrong... Technical Note TN2250 - Understanding and Resolving Code Signing Issues
  • 61. TestFlight Distribution Setup a free TestFlight account and create a team. Invite and gather the UDIDs from the team members. Add devices to your ADC Provisioning Profile. Build an .ipa archive in Xcode and upload to TestFlight. Distribute the build and manage the feedback.