Commit 59becbf7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Skin back button correctly everywhere

parent bad3ae21
......@@ -23,9 +23,10 @@
[contributeButton setBackgroundImage:[UIImage imageNamed:@"button"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[contributeButton setBackgroundImage:[UIImage imageNamed:@"buttonHighlight"] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
self.navigationItem.rightBarButtonItem = contributeButton;
else
self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(goBack:)];
} else
self.navigationItem.leftBarButtonItem = contributeButton;
NSMutableString *htmlContent = [NSMutableString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"About Contents" ofType:@"html"] encoding:NSUTF8StringEncoding error:nil];
......@@ -36,6 +37,11 @@
self.webView.delegate = self;
}
- (IBAction)goBack:(id)sender
{
[self.navigationController popViewControllerAnimated:YES];
}
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
NSURL *requestURL = request.URL;
......
......@@ -10,6 +10,7 @@
#import "VLCHTTPDownloadViewController.h"
#import "VLCHTTPFileDownloader.h"
#import "UIBarButtonItem+Theme.h"
@interface VLCHTTPDownloadViewController ()
{
......@@ -24,6 +25,8 @@
{
[self.downloadButton setTitle:NSLocalizedString(@"BUTTON_DOWNLOAD",@"") forState:UIControlStateNormal];
_currentDownloads = [[NSMutableArray alloc] init];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(goBack:)];
[super viewDidLoad];
}
......@@ -44,6 +47,11 @@
}
#pragma mark - UI interaction
- (IBAction)goBack:(id)sender
{
[self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)downloadAction:(id)sender
{
if ([self.urlField.text length] > 0) {
......
......@@ -136,6 +136,8 @@
if (!self.settingsViewController) {
self.settingsViewController = [[IASKAppSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
self.settingsController.viewController = self.settingsViewController;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
self.settingsViewController.navigationItem.leftBarButtonItem = [UIBarButtonItem themedBackButtonWithTarget:self.settingsViewController andSelector:@selector(dismiss:)];
}
self.settingsViewController.modalPresentationStyle = UIModalPresentationFormSheet;
......
......@@ -11,6 +11,7 @@
#import "VLCOpenNetworkStreamViewController.h"
#import "VLCAppDelegate.h"
#import "VLCPlaylistViewController.h"
#import "UIBarButtonItem+Theme.h"
@interface VLCOpenNetworkStreamViewController ()
{
......@@ -34,6 +35,9 @@
[super viewDidLoad];
[self.openButton setTitle:NSLocalizedString(@"BUTTON_OPEN", @"") forState:UIControlStateNormal];
[self.privateModeLabel setText:NSLocalizedString(@"PRIVATE_PLAYBACK_TOGGLE", @"")];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedBackButtonWithTarget:self andSelector:@selector(goBack:)];
}
- (void)viewWillAppear:(BOOL)animated
......@@ -71,6 +75,11 @@
}
#pragma mark - UI interaction
- (IBAction)goBack:(id)sender
{
[self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)openButtonAction:(id)sender
{
if ([self.urlField.text length] > 0) {
......
......@@ -45,7 +45,10 @@
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender
{
[self.viewController.navigationController dismissModalViewControllerAnimated:YES];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
[self.viewController.navigationController popViewControllerAnimated:YES];
else
[self.viewController.navigationController dismissModalViewControllerAnimated:YES];
}
- (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForSpecifier:(IASKSpecifier*)specifier {
......
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