summaryrefslogtreecommitdiff
path: root/tests/examplefiles/objc_example.m
blob: 67b330226845037644c71a65db2bafa8a1a3d154 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#import "Somefile.h"

@implementation ABC

- (id)a:(B)b {
    return 1;
}

@end

@implementation ABC

- (void)xyz;

@end

NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
    @"quattuor", @"four", @"quinque", @"five", @"sex", @"six", nil];


NSString *key;
for (key in dictionary) {
    NSLog(@"English: %@, Latin: %@", key, [dictionary valueForKey:key]);
}

// Literals
NSArray *a = @[ @"1", @"2" ];

NSDictionary *d = @{ @"key": @"value" };

NSNumber *n1 = @( 1 );
NSNumber *n2 = @( [a length] );