Featured post

Difference between protocol and delegates?

A protocol, declared with the ( @protocol syntax in Objective-C) is used to declare a set of methods that a class "adopts" (de...

Thursday, 9 April 2015

What is readwrite in Objective C ?

-setter and getter generated.
-Indicates that the property should be treated as read/write.
-This attribute is the default.
-Both a getter and setter method are required in the @implementation block. If you use the @synthesize directive in the implementation 

block, the getter and setter methods are synthesized.

Example:
@property (nonatomic, readwrite) NSString *name;
@synthesize name; 

No comments:

Post a Comment