diff options
author | Joseph Heenan <joseph@emobix.co.uk> | 2016-06-07 16:46:14 +0100 |
---|---|---|
committer | Joseph Heenan <joseph@emobix.co.uk> | 2016-06-09 10:57:47 +0100 |
commit | a3ab5aa8e840ba10f9c259a3e3f07d76f4562428 (patch) | |
tree | fa76a4aa5301d5916efe719ec7fcaec14bcbe993 /platform/ios/Classes/MuChoiceFieldController.m | |
parent | 641935ed19f95dfb7eab1309905e960389628289 (diff) | |
download | mupdf-a3ab5aa8e840ba10f9c259a3e3f07d76f4562428.tar.xz |
iOS: Run Xcode's "Convert to Modern ObjC" for "ObjC literals"
Uses the more modern/concise syntax that arrived in Xcode 4.4
Diffstat (limited to 'platform/ios/Classes/MuChoiceFieldController.m')
-rw-r--r-- | platform/ios/Classes/MuChoiceFieldController.m | 8 |
1 files changed, 4 insertions, 4 deletions
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]; } |