SlideShare a Scribd company logo
More than UI Sujith Krishnan 30SS
Foundation framework Common Classes String  NSString   NSMutableString Array  NSArray   NSMutableArray Dictionary  NSDict..   NSMutableDict.. File Handling  NSFileManager Persistance  NSKeyedArchiver Thread   NSThread Timer   NSTimer XML   NSXmlParser HTTP Connection   NSURLReqest
Collections – Array & Dictionary Retain the objects Available as mutable and immutable Direct persistence  –  writeToFile Generic – can hold any objects
Autorelease ??? Framework take care of releasing the object Factory methods are  autorelease  methods Can call  autorelease  on any object Write methods which will return  autorelease  objects
Autorelease pool Pool of  autorelease  objects Restrict the scope of  autorelease  objects Must to use in thread methods Call retain to extend the scope of variable -(void)anyMethod{ NSAutoreleasePool *pool = [[NSAuto… // allocate a lot of memory (autorelease) [pool release]; }
Autorelease -  A Scenario (NSString*)someMethod{ NSString *stringToReturn = nil; for (int i = 0; i < someLargeNumber; i++) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSString *string = ...; string = [string stringByAppendingString:...]; if ([string someCondition]) { stringToReturn = [string retain]; } [pool release]; if (stringToReturn)  break; } return [stringToReturn autorelease]; }
Persistence Saving object state to a file Should implement encoding methods Key – Value NSKeyedArchiver NSKeyedUnarchiver Save in document directory Can use  SQLite3  also
\tmp temporary files used by f/w  \Documents user files \Library application preferences, settings etc.. Application Directories
Typical NSThread Use Case - (void)someAction:(id)sender { // Fire up a new thread [NSThread detachNewThreadSelector:@selector(doWork:) withTarget:self object:someData]; } - (void)doWork:(id)someData { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [someData doLotsOfWork]; // Message back to the main thread [self performSelectorOnMainThread:@selector(allDone:) withObject:[someData result] waitUntilDone:NO]; [pool release]; }
Delegates Define delegate methods @required   &  @optional Multiple object and single delegate definition Object comparison Use of  tag
Accelerometer - Hints
Format Specifiers Same as what we use for rest of OOP %@   - for NSString , Object , Date etc… Can use positional specifiers IEEE print specifications

More Related Content

PDF
iOS: Using persistant storage
PDF
Kudu and Rust
PDF
Gsummit apis-2012
PDF
Scheming Defaults
PPTX
HBaseCon 2013: OpenTSDB at Box
PDF
"Metrics: Where and How", Vsevolod Polyakov
PDF
Storm introduction
PDF
Intorduce to Ceph
iOS: Using persistant storage
Kudu and Rust
Gsummit apis-2012
Scheming Defaults
HBaseCon 2013: OpenTSDB at Box
"Metrics: Where and How", Vsevolod Polyakov
Storm introduction
Intorduce to Ceph

What's hot (20)

PDF
Nsq.io on Node.js and Shell
PDF
Gnocchi v3 brownbag
PPTX
Threads and Node.js
PPTX
Secure code 3rd_party_libs
PPTX
opentsdb in a real enviroment
PDF
Full Text Search in PostgreSQL
PDF
(No)SQL Timing Attacks for Data Retrieval
PDF
Introduction to Apache Tajo: Data Warehouse for Big Data
PDF
Gnocchi Profiling 2.1.x
TXT
PPTX
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
PDF
Gnocchi v4 (preview)
PDF
Performance evaluation of apache tajo
PDF
Openstack 簡介
PDF
Gnocchi Profiling v2
PDF
node-fs
PDF
Ceph Object Storage Performance Secrets and Ceph Data Lake Solution
PDF
Easy access to open stack object storage
PPTX
Thinking in Sequences - Streams in Node.js & IO.js
PDF
Tajo case study bay area hug 20131105
Nsq.io on Node.js and Shell
Gnocchi v3 brownbag
Threads and Node.js
Secure code 3rd_party_libs
opentsdb in a real enviroment
Full Text Search in PostgreSQL
(No)SQL Timing Attacks for Data Retrieval
Introduction to Apache Tajo: Data Warehouse for Big Data
Gnocchi Profiling 2.1.x
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
Gnocchi v4 (preview)
Performance evaluation of apache tajo
Openstack 簡介
Gnocchi Profiling v2
node-fs
Ceph Object Storage Performance Secrets and Ceph Data Lake Solution
Easy access to open stack object storage
Thinking in Sequences - Streams in Node.js & IO.js
Tajo case study bay area hug 20131105
Ad

Similar to More than UI (20)

PPTX
iOS Session-2
PDF
Ts archiving
PPT
Classes and objects constructor and destructor
PPTX
Get docs from sp doc library
PPTX
.NET Multithreading/Multitasking
ZIP
PPT
Oracle Tracing
PPT
cpphtp4_PPT_06_Classes and Data Abstraction.ppt
ODP
Biopython
PDF
NodeJSnodesforfreeinmyworldgipsnndnnd.pdf
PPTX
Learning Puppet basic thing
PDF
Docker Architecture (v1.3)
PDF
Полнотекстовый поиск в PostgreSQL / Александр Алексеев (Postgres Professional)
PPT
Objective C Memory Management
PPT
iOS Multithreading
PPT
Persistences
PPTX
Apache Cassandra, part 2 – data model example, machinery
PDF
Swift와 Objective-C를 함께 쓰는 방법
iOS Session-2
Ts archiving
Classes and objects constructor and destructor
Get docs from sp doc library
.NET Multithreading/Multitasking
Oracle Tracing
cpphtp4_PPT_06_Classes and Data Abstraction.ppt
Biopython
NodeJSnodesforfreeinmyworldgipsnndnnd.pdf
Learning Puppet basic thing
Docker Architecture (v1.3)
Полнотекстовый поиск в PostgreSQL / Александр Алексеев (Postgres Professional)
Objective C Memory Management
iOS Multithreading
Persistences
Apache Cassandra, part 2 – data model example, machinery
Swift와 Objective-C를 함께 쓰는 방법
Ad

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
KodekX | Application Modernization Development
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
Teaching material agriculture food technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Electronic commerce courselecture one. Pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Building Integrated photovoltaic BIPV_UPV.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf

More than UI

  • 1. More than UI Sujith Krishnan 30SS
  • 2. Foundation framework Common Classes String NSString NSMutableString Array NSArray NSMutableArray Dictionary NSDict.. NSMutableDict.. File Handling NSFileManager Persistance NSKeyedArchiver Thread NSThread Timer NSTimer XML NSXmlParser HTTP Connection NSURLReqest
  • 3. Collections – Array & Dictionary Retain the objects Available as mutable and immutable Direct persistence – writeToFile Generic – can hold any objects
  • 4. Autorelease ??? Framework take care of releasing the object Factory methods are autorelease methods Can call autorelease on any object Write methods which will return autorelease objects
  • 5. Autorelease pool Pool of autorelease objects Restrict the scope of autorelease objects Must to use in thread methods Call retain to extend the scope of variable -(void)anyMethod{ NSAutoreleasePool *pool = [[NSAuto… // allocate a lot of memory (autorelease) [pool release]; }
  • 6. Autorelease - A Scenario (NSString*)someMethod{ NSString *stringToReturn = nil; for (int i = 0; i < someLargeNumber; i++) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSString *string = ...; string = [string stringByAppendingString:...]; if ([string someCondition]) { stringToReturn = [string retain]; } [pool release]; if (stringToReturn) break; } return [stringToReturn autorelease]; }
  • 7. Persistence Saving object state to a file Should implement encoding methods Key – Value NSKeyedArchiver NSKeyedUnarchiver Save in document directory Can use SQLite3 also
  • 8. \tmp temporary files used by f/w \Documents user files \Library application preferences, settings etc.. Application Directories
  • 9. Typical NSThread Use Case - (void)someAction:(id)sender { // Fire up a new thread [NSThread detachNewThreadSelector:@selector(doWork:) withTarget:self object:someData]; } - (void)doWork:(id)someData { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [someData doLotsOfWork]; // Message back to the main thread [self performSelectorOnMainThread:@selector(allDone:) withObject:[someData result] waitUntilDone:NO]; [pool release]; }
  • 10. Delegates Define delegate methods @required & @optional Multiple object and single delegate definition Object comparison Use of tag
  • 12. Format Specifiers Same as what we use for rest of OOP %@ - for NSString , Object , Date etc… Can use positional specifiers IEEE print specifications