« first day (10 days earlier)      last day (132 days later) » 

23:47
@nhgrif Whoa, definitely didn't know this was here till now.
lol
NSString *plistCatPath = [[NSBundle mainBundle] pathForResource:@"quotes" ofType:@"plist"];
Hi, and welcome to your new digs ;-)
Yep. Methods like that are part of the reason I quite like ObjC.
Why is the [NSBundle mainBundle] in brackets inside brackets?
23:49
Bye!
Bye!
It's a nested method call.
mainBundle is a class method of NSBundle which returns a specific bundle.
pathForResource:ofType: is an instance method of the class which returns a file path as an NSString for a given file, of a given type, within the given bundle.
That code is the same as doing this:
NSBundle *someBundle = [NSBundle mainBundle]; NSString *plistCatPath = [someBundle pathForResource:@"quotes" ofType:@"pList"];
Except the line of your code will release the [NSBundle mainBundle] object sooner.
Hmm, is this because it naturally has weak properties?
It has nothing to do with strong/weak.
When you nest it, there are 0 references to it as soon as pathForResource:ofType: returns.
The sample code I showed you, the reference to it is saved in someBundle, so it won't be released until someBundle goes out of scope.
That doesn't mean it's always better to nest... the memory is negligible here, and overnesting quickly becomes unreadable.

« first day (10 days earlier)      last day (132 days later) »