Commit 16363830 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Generalize 'Play All' button creation

(cherry picked from commit e9044f41)
parent 0aee14a8
......@@ -77,11 +77,8 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier";
_tapTwiceGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapTwiceGestureAction:)];
[_tapTwiceGestureRecognizer setNumberOfTapsRequired:2];
UIBarButtonItem *playAllButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:self action:@selector(playAllAction:)];
playAllButton.accessibilityLabel = NSLocalizedString(@"PLAY_ALL_BUTTON", nil);
playAllButton.isAccessibilityElement = YES;
self.navigationItem.rightBarButtonItems = @[[UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(menuButtonAction:)],
playAllButton];
[UIBarButtonItem themedPlayAllButtonWithTarget:self andSelector:@selector(playAllAction:)]];
_searchData = [[NSMutableArray alloc] init];
[_searchData removeAllObjects];
......
......@@ -13,4 +13,5 @@
+ (UIBarButtonItem *)themedBackButtonWithTarget:(id)target andSelector:(SEL)selector;
+ (UIBarButtonItem *)themedRevealMenuButtonWithTarget:(id)target andSelector:(SEL)selector;
+ (UIBarButtonItem *)themedDarkToolbarButtonWithTitle: (NSString*) title target:(id)target andSelector:(SEL)selector;
@end
\ No newline at end of file
+ (UIBarButtonItem *)themedPlayAllButtonWithTarget:(id)target andSelector:(SEL)selector;
@end
......@@ -57,4 +57,14 @@
return button;
}
@end
\ No newline at end of file
+ (UIBarButtonItem *)themedPlayAllButtonWithTarget:(id)target andSelector:(SEL)selector
{
UIBarButtonItem *playAllButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:target action:selector];
playAllButton.accessibilityLabel = NSLocalizedString(@"PLAY_ALL_BUTTON", nil);
playAllButton.isAccessibilityElement = YES;
return playAllButton;
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment