Xcodeは私の(考えられている)タイプミスのエラーを出しません:
NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:@"theme"];
NSLog(@"Theme: %@", theme ?: @"Default");
それが判明:
NSLog(@"Theme: %@", theme ?: @"Default");
と同じように機能します:
NSLog(@"Theme: %@", theme ? theme : @"Default");
上記の短縮構文はgccにのみ有効ですか?それともObjective-Cの一部ですか?