iOS: A few code modernizations

This commit is contained in:
Jonathan Schleifer 2017-11-26 20:19:07 +01:00
parent ccc0706caa
commit f886262722
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
8 changed files with 46 additions and 33 deletions

View file

@ -66,7 +66,7 @@ static NSString *aboutHTMLTemplate =
self.automaticallyAdjustsScrollViewInsets = NO;
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSDictionary *infoDictionary = NSBundle.mainBundle.infoDictionary;
NSString *version = infoDictionary[@"CFBundleShortVersionString"];
NSString *aboutHTML = [aboutHTMLTemplate
stringByReplacingOccurrencesOfString: @"{version}"
@ -87,9 +87,9 @@ static NSString *aboutHTMLTemplate =
navigationType: (UIWebViewNavigationType)navigationType
{
if (navigationType == UIWebViewNavigationTypeLinkClicked) {
[[UIApplication sharedApplication] openURL: request.URL
options: @{}
completionHandler: ^ (BOOL success) {
[UIApplication.sharedApplication openURL: request.URL
options: @{}
completionHandler: ^ (BOOL success) {
}];
return NO;
}