iOS: A few code modernizations
This commit is contained in:
parent
ccc0706caa
commit
f886262722
8 changed files with 46 additions and 33 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue