This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-01-21 14:57:39.317 getifaddrs[31705:707] name=lo0, family=30, address=fe80::1 | |
2014-01-21 14:57:39.319 getifaddrs[31705:707] name=lo0, family=2, address=127.0.0.1 | |
2014-01-21 14:57:39.319 getifaddrs[31705:707] name=lo0, family=30, address=::1 | |
2014-01-21 14:57:39.320 getifaddrs[31705:707] name=en1, family=30, address=fe80::fa1a:67ff:fe0e:30eb | |
2014-01-21 14:57:39.320 getifaddrs[31705:707] name=en1, family=2, address=192.168.1.100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface ClassA : NSObject | |
@property NSMutableString *string; | |
- (void)changeString; | |
- (void)printString; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
static void nextMonth(NSDateComponents *comps) { | |
NSInteger month = [comps month]; | |
if (month == 12) { | |
[comps setYear:[comps year] + 1]; | |
[comps setMonth:1]; | |
} else { | |
[comps setMonth:month + 1]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat locktest.m | |
#import <Foundation/Foundation.h> | |
@interface Locker : NSObject { | |
NSRecursiveLock *_lock; | |
} | |
- (void)setLock:(NSRecursiveLock *)lock; | |
@end | |
@implementation Locker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main(int argc, const char **argv) { | |
@autoreleasepool { | |
NSMutableArray *mutableArray; | |
NSString *str = @"one two three"; | |
mutableArray = [[str componentsSeparatedByString:@" "] copy]; | |
[mutableArray addObject:@"four"]; | |
for (NSString *s in mutableArray) { | |
NSLog(@"%@", s); |
NewerOlder