Q)is it a requirement that all interface classes inherit from super class? Q) In the code below - from iOS5 on wards with ARC do i still need to do (player is NSMUtable array) unless i'm wrong i believe after ARC we dont need to keep ref count:
//is this required then? Player *player = [[Player alloc] init];
{players = [NSMutableArray arrayWithCapacity:20];
Player *player = [[Player alloc] init];
player.name = @"Bill Evans";
player.game = @"Tic-Tac-Toe";
player.rating = 4;
[players addObject:player];
player = [[Player alloc] init];
player.name = @"Oscar Peterson";
player.game = @"Spin the Bottle";
player.rating = 5;
[players addObject:player];
player = [[Player alloc] init];
player.name = @"Dave Brubeck";
player.game = @"Texas Hold’em Poker";
player.rating = 2;
[players addObject:player];}
Q) what is the rule around making interface file and implementation file sub class of i.e. in java everything is derived from OBject class so do we declare NSObject for both implementaiotn / interface classes or its not needed and where else i would define this?
Q) which one is recomended solution A: Player *player = [[Player alloc] init]; OR B: Player *player = [[Player new]; //unless this is illegal?
Q) is ARC only available on Mac OS X apps or also on iOS i.e. iphone / touch etc or we still have to do manual memory management?
Q) can singleton pattern be applied to Objective-c,cocoa touch iphone apps?