SlideShare a Scribd company logo
1 of 27
Download to read offline
Three20 framework for iOS development

      Chih-Wei Lee
Google Summer of Code Student 2010

Email: dlackty@gmail.com
Twitter/Facebook/GitHub: @dlackty
Google Summer of Code 2010
Why you should know more about mobile apps?
Lots of new startups build their own mobile app first!
Web giants also build wonderful mobile apps.
Mobile first, web second.



   1. Mobile is exploding

   2. Mobile forces you to focus

   3. Mobile extends your capabilities




                                      Luke Wroblewski
                           Source : http://www.lukew.com/ff/entry.asp?933
Connected to Internet

90% apps has data transmission to server
•Push notifications
•Member system
•Data display/browse
•Online ranking
•Search
Cocoa touch aren’t optimized as a web client

•No simple mechanism to manipulate online objects
•Need to make lots of caches of online resource
•Some UI components are missing
•Navigation between view controllers are trivial

•There’re event no built-in JSON parsers!
Three20
Three20

•Originally developed by Joe Hewitt at Facebook
•Used to build official Facebook app
•Similar to many web frameworks

•Now an most popular Objective-C project on GitHub
More on http://three20.info/
Three20 modules
Three20 Core

Three20 Core provides a basic set of tools useful for
debugging your applications, dealing with standard data
structures, and doing basic text manipulation.
Examples:

•TT_RELEASE_SAFELY(POINTER);
•NSString* TTPathForDocumentsResource(NSString* relativePath);
•(NSDictionary*)queryDictionaryUsingEncoding:(NSStringEncoding)
encoding;

•NSArray - (void)perform:(SEL)selector;
•NSData - (NSString*)md5Hash;
Three20 Network

Three20 Network mainly provide TTURLRequest,
compared to NSURLRequest, it provides more features.
Features

•HTTP methods support (POST/GET/PUT)
•Simple post parameters
•File-based cache
•Automatically parse downloaded data an validate
•Handle cookies
Three20 UICommon

Three20 UICommon provides basic UI utilities for
construction of higher level UI modules.
Examples:

•float TTOSVersion();
•BOOL TTIsPad();
•BOOL TTIsKeyboardVisible();
•void TTAlert(NSString* message);
•- (UIView*)findFirstResponderInView:(UIView*)topView;
Three20 UINavigator

Three20 UINavigator makes iPhone apps like web apps
based on URL-mapping mechanism.
The URLs are mapped into Objective-C view controllers,
and the parameters are passed to init method.
Features:

•TTBaseNavigator - The main url handler to open urls
•TTURLAction - Action to open url with some option parameters
•TTURLMap - Map URLS to view controllers
URL-Mapping examples
    TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[TTWebController class]];
[map from:@"tt://catalog" toViewController:[CatalogController class]];
[map from:@"tt://photoTest1" toViewController:[PhotoTest1Controller class]];
[map from:@"tt://photoTest2" toViewController:[PhotoTest2Controller class]];
[map from:@"tt://imageTest1" toViewController:[ImageTest1Controller class]];
[map from:@"tt://tableTest" toViewController:[TableTestController class]];



then, you can simply:
TTOpenURL(@"tt://launcherTest");



Instead of
LauncherViewTestController *viewController = [[LauncherViewTestController alloc] init];
[self.navigationController pushViewController:viewController animated:YES];
[viewController release];
Three20 Style

Three20 Style make developers to style UIs with a main
stylesheets, instead of manually set each UIs style.
Also it provides some utilities to cope with UIs and do
images manipulations.
Examples:

•- (UIImage*)transformWidth:(CGFloat)width height:(CGFloat)height rotate:
(BOOL)rotate;

•- (void)drawInRect:(CGRect)rect radius:(CGFloat)radius;
Three20 UI

Three20 UI is the most wonderful part of the framework,
includes enhancements of UIKit, new view controllers and
new UI components
TTImageView examples

  TTImageView *imageView = [[TTImageView alloc] initWithFrame:frame];
  [imageView setUrlPath:@"http://www.foo.com/bar.jpg"];




Instead of
  UIImageView *imageView = [[UIImageView alloc] initWithFrame:frame];
  NSURL *url = [NSURL URLWithString:@"http://www.foo.com/bar.jpg"];
  NSData *data = [[NSData alloc] initWithContentsOfURL:url];
  [imageView setImage:[UIImage imageWithData:data]];




and with additional
asynchronous loading, and disk cache
TTPhotoViewController
TTMessageController
TTLauncherView
Three20 extensions
Three20 Extensions

extCSSStyle
This extension provides support for reading Three20 style sheets from CSS files.

extXML
Three20 XML Extension for parsing XML objects into Objective-C NSObjects.

extJSON
Three20 JSON Extension for parsing JSON objects in to Objective-C
NSObjects.
New official website with docs and tutorials
                                 Check out http://three20.info/
Reference

Official website http://three20.info
GitHub http://github.com/facebook/three20
Google Group http://groups.google.com/group/three20/

More Related Content

Similar to Three20 Framework for iOS Development

The current status of html5 technology and standard
The current status of html5 technology and standardThe current status of html5 technology and standard
The current status of html5 technology and standardWonsuk Lee
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesTeamstudio
 
Architecting your Frontend
Architecting your FrontendArchitecting your Frontend
Architecting your FrontendRuben Teijeiro
 
Manageable Robust Automated Ui Test
Manageable Robust Automated Ui TestManageable Robust Automated Ui Test
Manageable Robust Automated Ui TestJohn.Jian.Fang
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
The fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose ReactThe fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose ReactOliver N
 
Faites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB StitchFaites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB StitchMongoDB
 
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?Andrew Barickman
 
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyRed Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyMark Proctor
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB
 
Overview of Visual Studio Team System 2010
Overview of Visual Studio Team System 2010Overview of Visual Studio Team System 2010
Overview of Visual Studio Team System 2010joycsc
 
Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]Andrii Lundiak
 
Building Responsive Websites with the Bootstrap 3 Framework
Building Responsive Websites with the Bootstrap 3 FrameworkBuilding Responsive Websites with the Bootstrap 3 Framework
Building Responsive Websites with the Bootstrap 3 FrameworkWebvanta
 
Siligong.Data - May 2021 - Transforming your analytics workflow with dbt
Siligong.Data - May 2021 - Transforming your analytics workflow with dbtSiligong.Data - May 2021 - Transforming your analytics workflow with dbt
Siligong.Data - May 2021 - Transforming your analytics workflow with dbtJon Su
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Takumi Sakamoto
 
Architecting modern Android apps
Architecting modern Android appsArchitecting modern Android apps
Architecting modern Android appsGrigori Hlopkov
 

Similar to Three20 Framework for iOS Development (20)

The current status of html5 technology and standard
The current status of html5 technology and standardThe current status of html5 technology and standard
The current status of html5 technology and standard
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
Architecting your Frontend
Architecting your FrontendArchitecting your Frontend
Architecting your Frontend
 
Manageable Robust Automated Ui Test
Manageable Robust Automated Ui TestManageable Robust Automated Ui Test
Manageable Robust Automated Ui Test
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
The fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose ReactThe fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose React
 
Faites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB StitchFaites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB Stitch
 
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
 
Apps & Widgets in Mobile Learning
Apps & Widgets in Mobile LearningApps & Widgets in Mobile Learning
Apps & Widgets in Mobile Learning
 
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyRed Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
 
Overview of Visual Studio Team System 2010
Overview of Visual Studio Team System 2010Overview of Visual Studio Team System 2010
Overview of Visual Studio Team System 2010
 
Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]
 
Meteor meetup
Meteor meetupMeteor meetup
Meteor meetup
 
Building Responsive Websites with the Bootstrap 3 Framework
Building Responsive Websites with the Bootstrap 3 FrameworkBuilding Responsive Websites with the Bootstrap 3 Framework
Building Responsive Websites with the Bootstrap 3 Framework
 
Siligong.Data - May 2021 - Transforming your analytics workflow with dbt
Siligong.Data - May 2021 - Transforming your analytics workflow with dbtSiligong.Data - May 2021 - Transforming your analytics workflow with dbt
Siligong.Data - May 2021 - Transforming your analytics workflow with dbt
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?
 
Architecting modern Android apps
Architecting modern Android appsArchitecting modern Android apps
Architecting modern Android apps
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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 2024Rafal Los
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
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 organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Three20 Framework for iOS Development

  • 1. Three20 framework for iOS development Chih-Wei Lee Google Summer of Code Student 2010 Email: dlackty@gmail.com Twitter/Facebook/GitHub: @dlackty
  • 2. Google Summer of Code 2010
  • 3. Why you should know more about mobile apps?
  • 4. Lots of new startups build their own mobile app first!
  • 5. Web giants also build wonderful mobile apps.
  • 6. Mobile first, web second. 1. Mobile is exploding 2. Mobile forces you to focus 3. Mobile extends your capabilities Luke Wroblewski Source : http://www.lukew.com/ff/entry.asp?933
  • 7. Connected to Internet 90% apps has data transmission to server •Push notifications •Member system •Data display/browse •Online ranking •Search
  • 8. Cocoa touch aren’t optimized as a web client •No simple mechanism to manipulate online objects •Need to make lots of caches of online resource •Some UI components are missing •Navigation between view controllers are trivial •There’re event no built-in JSON parsers!
  • 10. Three20 •Originally developed by Joe Hewitt at Facebook •Used to build official Facebook app •Similar to many web frameworks •Now an most popular Objective-C project on GitHub
  • 13. Three20 Core Three20 Core provides a basic set of tools useful for debugging your applications, dealing with standard data structures, and doing basic text manipulation. Examples: •TT_RELEASE_SAFELY(POINTER); •NSString* TTPathForDocumentsResource(NSString* relativePath); •(NSDictionary*)queryDictionaryUsingEncoding:(NSStringEncoding) encoding; •NSArray - (void)perform:(SEL)selector; •NSData - (NSString*)md5Hash;
  • 14. Three20 Network Three20 Network mainly provide TTURLRequest, compared to NSURLRequest, it provides more features. Features •HTTP methods support (POST/GET/PUT) •Simple post parameters •File-based cache •Automatically parse downloaded data an validate •Handle cookies
  • 15. Three20 UICommon Three20 UICommon provides basic UI utilities for construction of higher level UI modules. Examples: •float TTOSVersion(); •BOOL TTIsPad(); •BOOL TTIsKeyboardVisible(); •void TTAlert(NSString* message); •- (UIView*)findFirstResponderInView:(UIView*)topView;
  • 16. Three20 UINavigator Three20 UINavigator makes iPhone apps like web apps based on URL-mapping mechanism. The URLs are mapped into Objective-C view controllers, and the parameters are passed to init method. Features: •TTBaseNavigator - The main url handler to open urls •TTURLAction - Action to open url with some option parameters •TTURLMap - Map URLS to view controllers
  • 17. URL-Mapping examples TTURLMap* map = navigator.URLMap; [map from:@"*" toViewController:[TTWebController class]]; [map from:@"tt://catalog" toViewController:[CatalogController class]]; [map from:@"tt://photoTest1" toViewController:[PhotoTest1Controller class]]; [map from:@"tt://photoTest2" toViewController:[PhotoTest2Controller class]]; [map from:@"tt://imageTest1" toViewController:[ImageTest1Controller class]]; [map from:@"tt://tableTest" toViewController:[TableTestController class]]; then, you can simply: TTOpenURL(@"tt://launcherTest"); Instead of LauncherViewTestController *viewController = [[LauncherViewTestController alloc] init]; [self.navigationController pushViewController:viewController animated:YES]; [viewController release];
  • 18. Three20 Style Three20 Style make developers to style UIs with a main stylesheets, instead of manually set each UIs style. Also it provides some utilities to cope with UIs and do images manipulations. Examples: •- (UIImage*)transformWidth:(CGFloat)width height:(CGFloat)height rotate: (BOOL)rotate; •- (void)drawInRect:(CGRect)rect radius:(CGFloat)radius;
  • 19. Three20 UI Three20 UI is the most wonderful part of the framework, includes enhancements of UIKit, new view controllers and new UI components
  • 20. TTImageView examples TTImageView *imageView = [[TTImageView alloc] initWithFrame:frame]; [imageView setUrlPath:@"http://www.foo.com/bar.jpg"]; Instead of UIImageView *imageView = [[UIImageView alloc] initWithFrame:frame]; NSURL *url = [NSURL URLWithString:@"http://www.foo.com/bar.jpg"]; NSData *data = [[NSData alloc] initWithContentsOfURL:url]; [imageView setImage:[UIImage imageWithData:data]]; and with additional asynchronous loading, and disk cache
  • 25. Three20 Extensions extCSSStyle This extension provides support for reading Three20 style sheets from CSS files. extXML Three20 XML Extension for parsing XML objects into Objective-C NSObjects. extJSON Three20 JSON Extension for parsing JSON objects in to Objective-C NSObjects.
  • 26. New official website with docs and tutorials Check out http://three20.info/
  • 27. Reference Official website http://three20.info GitHub http://github.com/facebook/three20 Google Group http://groups.google.com/group/three20/