I hereby claim:
- I am eugenerash on github.
- I am eugenegolub (https://keybase.io/eugenegolub) on keybase.
- I have a public key ASD6rPVPCog6GnVlOagYV8QHHk-i-fhP-YM9WASdSUMQxAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
find . -name \*.m | xargs genstrings -o en.lproj |
NSString *sourceString = [[NSThread callStackSymbols] objectAtIndex:1]; | |
NSCharacterSet *separatorSet = [NSCharacterSet characterSetWithCharactersInString:@" -[]+?.,"]; | |
NSMutableArray *array = [NSMutableArray arrayWithArray:[sourceString componentsSeparatedByCharactersInSet:separatorSet]]; | |
[array removeObject:@""]; | |
NSLog(@"Stack = %@", [array objectAtIndex:0]); | |
NSLog(@"Framework = %@", [array objectAtIndex:1]); | |
NSLog(@"Memory address = %@", [array objectAtIndex:2]); | |
NSLog(@"Class caller = %@", [array objectAtIndex:3]); |
- (instancetype)init { | |
self = [super init]; | |
if (self) { | |
// ... | |
} | |
return self; | |
} |
@interface MySingleton : NSObject | |
+(instancetype) sharedInstance; | |
+(instancetype) alloc __attribute__((unavailable("alloc not available, call sharedInstance instead"))); | |
-(instancetype) init __attribute__((unavailable("init not available, call sharedInstance instead"))); | |
+(instancetype) new __attribute__((unavailable("new not available, call sharedInstance instead"))); | |
@end | |
@implementation MySingleton |