Commit efa21f52 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

About View: open external links in default browser

parent 5f3592e1
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface VLCAboutViewController : UIViewController @interface VLCAboutViewController : UIViewController <UIWebViewDelegate>
@property (nonatomic, strong) IBOutlet UIWebView *webView; @property (nonatomic, strong) IBOutlet UIWebView *webView;
@property (nonatomic, strong) IBOutlet UILabel *aspenVersion; @property (nonatomic, strong) IBOutlet UILabel *aspenVersion;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
[super viewDidLoad]; [super viewDidLoad];
[self.webView loadHTMLString:[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"About Contents" ofType:@"html"] encoding:NSUTF8StringEncoding error:nil] baseURL:nil]; [self.webView loadHTMLString:[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"About Contents" ofType:@"html"] encoding:NSUTF8StringEncoding error:nil] baseURL:nil];
self.webView.delegate = self;
self.aspenVersion.text = [[NSString stringWithFormat:NSLocalizedString(@"VERSION_FORMAT",@""), [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] stringByAppendingFormat:@" %@", kVLCVersionCodename]; self.aspenVersion.text = [[NSString stringWithFormat:NSLocalizedString(@"VERSION_FORMAT",@""), [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] stringByAppendingFormat:@" %@", kVLCVersionCodename];
self.vlckitVersion.text = [NSString stringWithFormat:NSLocalizedString(@"BASED_ON_FORMAT",@""),[[VLCLibrary sharedLibrary] version]]; self.vlckitVersion.text = [NSString stringWithFormat:NSLocalizedString(@"BASED_ON_FORMAT",@""),[[VLCLibrary sharedLibrary] version]];
...@@ -39,6 +40,11 @@ ...@@ -39,6 +40,11 @@
self.navigationItem.rightBarButtonItem = _dismissButton; self.navigationItem.rightBarButtonItem = _dismissButton;
} }
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
return ![[UIApplication sharedApplication] openURL:request.URL];
}
- (void)dismiss - (void)dismiss
{ {
[self dismissModalViewControllerAnimated:YES]; [self dismissModalViewControllerAnimated:YES];
......
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