From a3ab5aa8e840ba10f9c259a3e3f07d76f4562428 Mon Sep 17 00:00:00 2001 From: Joseph Heenan Date: Tue, 7 Jun 2016 16:46:14 +0100 Subject: iOS: Run Xcode's "Convert to Modern ObjC" for "ObjC literals" Uses the more modern/concise syntax that arrived in Xcode 4.4 --- platform/ios/Classes/MuChoiceFieldController.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'platform/ios/Classes/MuChoiceFieldController.m') diff --git a/platform/ios/Classes/MuChoiceFieldController.m b/platform/ios/Classes/MuChoiceFieldController.m index e30ff000..3a3aee94 100644 --- a/platform/ios/Classes/MuChoiceFieldController.m +++ b/platform/ios/Classes/MuChoiceFieldController.m @@ -48,12 +48,12 @@ - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { - return [choices count]; + return choices.count; } - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { - return [choices objectAtIndex:row]; + return choices[row]; } - (void) pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component @@ -63,8 +63,8 @@ - (IBAction)onOkay:(id)sender { - if (selected >= 0 && selected < [choices count]) - okayBlock([NSArray arrayWithObject:[choices objectAtIndex:selected]]); + if (selected >= 0 && selected < choices.count) + okayBlock(@[choices[selected]]); [self dismissViewControllerAnimated:YES completion:nil]; } -- cgit v1.2.3