
What does this code do?
NSUInteger* day = [cal ordinalityOfUnit:NSMonthCalendarUnit inUnit:NSYearCalendarUnit forDate:now];
nownowday shouldn't be a pointerWhat is wrong with this code fragment?
NSString* greeting = @"Hello";
if (!(greeting == @"Farewell"))
NSLog(@"We will meet again");
greeting shouldn't be a pointer@ before the stringsNSString references with ==if statementmalloc, free[obj retain] to increment its count, [obj release] to decrementdealloc method. If reference count reaches 0, that's called.
-(void)dealloc
{
/* call release on instance variable; then... */
[super dealloc];
}
@interface Subclass : SuperclassObjectNSObjectsuper is like in Java:
-(id) init {
self = [super init];
// ...
return self;
}
-(IBAction) actionMethod;
-(IBAction) actionMethod:(id)sender;
-(IBAction) actionMethod:(id)sender withEvent:(UIEvent *)event;
UIControl @property (retain, nonatomic) UILabel *statusText;
retain means that retain is called whenever this property is copied.nonatomic means that no lock code is inserted to make access threadsafeBOOL. This has two values: YES or NO.

workspace/lab11 directory, or if you feel adventurous, look at these efforts to make git play nice with symlinks.