summaryrefslogtreecommitdiff
path: root/platform/ios/Classes/MuChoiceFieldController.m
diff options
context:
space:
mode:
authorJoseph Heenan <joseph@emobix.co.uk>2016-06-07 16:46:14 +0100
committerJoseph Heenan <joseph@emobix.co.uk>2016-06-09 10:57:47 +0100
commita3ab5aa8e840ba10f9c259a3e3f07d76f4562428 (patch)
treefa76a4aa5301d5916efe719ec7fcaec14bcbe993 /platform/ios/Classes/MuChoiceFieldController.m
parent641935ed19f95dfb7eab1309905e960389628289 (diff)
downloadmupdf-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.m8
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];
}