Skip to content

Commit cc78738

Browse files
committed
Update to Modern Objective-C syntax
1 parent d0aed4c commit cc78738

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

TwitterSearch/TwitterSearch.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@
227227
buildSettings = {
228228
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
229229
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
230-
GCC_C_LANGUAGE_STANDARD = gnu99;
230+
GCC_C_LANGUAGE_STANDARD = "compiler-default";
231231
GCC_OPTIMIZATION_LEVEL = 0;
232232
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
233233
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
234-
GCC_VERSION = com.apple.compilers.llvmgcc42;
234+
GCC_VERSION = "";
235235
GCC_WARN_ABOUT_RETURN_TYPE = YES;
236236
GCC_WARN_UNUSED_VARIABLE = YES;
237237
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
@@ -244,8 +244,8 @@
244244
buildSettings = {
245245
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
246246
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
247-
GCC_C_LANGUAGE_STANDARD = gnu99;
248-
GCC_VERSION = com.apple.compilers.llvmgcc42;
247+
GCC_C_LANGUAGE_STANDARD = "compiler-default";
248+
GCC_VERSION = "";
249249
GCC_WARN_ABOUT_RETURN_TYPE = YES;
250250
GCC_WARN_UNUSED_VARIABLE = YES;
251251
IPHONEOS_DEPLOYMENT_TARGET = 6.0;

TwitterSearch/TwitterSearch/SearchViewController.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
147147
}
148148

149149
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ResultCellIdentifier];
150-
NSDictionary *tweet = [self.results objectAtIndex:indexPath.row];
151-
cell.textLabel.text = [tweet objectForKey:@"text"];
150+
NSDictionary *tweet = (self.results)[indexPath.row];
151+
cell.textLabel.text = tweet[@"text"];
152152
return cell;
153153
}
154154

@@ -228,10 +228,10 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
228228
NSError *jsonParsingError = nil;
229229
NSDictionary *jsonResults = [NSJSONSerialization JSONObjectWithData:self.buffer options:0 error:&jsonParsingError];
230230

231-
self.results = [jsonResults objectForKey:@"statuses"];
231+
self.results = jsonResults[@"statuses"];
232232
if ([self.results count] == 0)
233233
{
234-
NSArray *errors = [jsonResults objectForKey:@"errors"];
234+
NSArray *errors = jsonResults[@"errors"];
235235
if ([errors count])
236236
{
237237
self.searchState = UYLTwitterSearchStateFailed;

0 commit comments

Comments
 (0)