没有合适的资源?快使用搜索试试~ 我知道了~
iPhoneSDK
资源推荐
资源详情
资源评论
Introduction
Objective-C
Application Components
Building an Application
iPhone SDK
Uses Objective-C as the base programming language. Can mix
C/C++ code as necessary.
Similar to the Cocoa framework used to build Mac OS X
desktop applications.
Entirely MVC based.
Requires an Intel based Mac
1
.
Well documented with sample applications.
Xcode IDE and Interface Builder.
Simulator for ease of development and testing.
1
People have got it working on PPC machines.
Rakesh Vidyadharan iPhone SDK For Java Developers
Introduction
Objective-C
Application Components
Building an Application
Fundementals
Comparison with Java
Sample Code
Advanced Concepts
Language Fundementals
Smalltalk features added to C.
Objects follow different syntax.
[ o b j myMethod : param1 paramTwoName : param2 ] ;
True dynamic binding.
Weakly typed language.
Reference count based memory management.
alloc message increments refcount.
copy message increments refcount.
retain message increments refcount.
release message decrements refcount.
Rakesh Vidyadharan iPhone SDK For Java Developers
Introduction
Objective-C
Application Components
Building an Application
Fundementals
Comparison with Java
Sample Code
Advanced Concepts
Memory Management
Keep retain and release in the same code block.
NSString ∗ s t r = [ [ N S S t r i n g a l l o c ] i n i t ] ;
s e l f . s t r i n g = s t r ;
[ s t r r e l e a s e ] ;
Use autorelease for objects returned from methods.
NSString ∗ s t r = [ [ N S S t r i n g a l l o c ] i n i t ] ;
r e t u r n [ s t r a u t o r e l e a s e ] ;
Ensure all fields are released in the dealloc method.
[ f i e l d 1 r e l e a s e ] ;
[ f i e l d 2 r e l e a s e ] ;
[ s u p e r d e a l l o c ] ;
Rakesh Vidyadharan iPhone SDK For Java Developers
Introduction
Objective-C
Application Components
Building an Application
Fundementals
Comparison with Java
Sample Code
Advanced Concepts
Decorators more common than inheritance.
Class semantics
Have to explicitly extend NSObject.
All fields are protected by default.
Methods declared in header files are always public.
No garbage collector (on iPhone).
No method over-loading. Parameter handles are part of
method signature.
Pointer not reference based.
Methods are invoked via messages.
Categories allow adding behaviour to objects.
Accessor methods can be synthesised.
No namespaces.
Rakesh Vidyadharan iPhone SDK For Java Developers
剩余28页未读,继续阅读
资源评论
小小哭包
- 粉丝: 1900
- 资源: 3864
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功