All Questions
Tagged with static-initializer objective-c
3 questions
0
votes
1
answer
242
views
Overriding a NSMutableUrlRequest static initializer?
Heres my scenario. Most of my network calls now need to have an api key inserted into the header field when making a request. So what i was thinking i could do was make a category of ...
0
votes
2
answers
412
views
Weird singleton initialization in static function initialize during unit tests
I have a following code in my singleton class
static MySingleton *gManager;
+(void)initialize
{
if(self == [MySingleton class])
{
gManager = [[MySingleton alloc] initWithServices:[[...
0
votes
1
answer
457
views
Using constant objects in objective-c
I have a piece of code similar to this:
//Foo.h
OBJC_EXPORT MyObject *const myObj;
// Foo.m
MyObject *const myObj;
@implementation Foo
+(void) initialize
{
if (self = [Graph class])
{
...