Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Classes/UI/HSArticleDetailViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//THE SOFTWARE.
#import <UIKit/UIKit.h>
@import SafariServices;
#import "HSKBItem.h"
#import "HSViewController.h"

Expand Down
7 changes: 6 additions & 1 deletion Classes/UI/HSArticleDetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)

if(navigationType == UIWebViewNavigationTypeLinkClicked)
{
[[UIApplication sharedApplication] openURL:[request URL]];
if ([SFSafariViewController class] != nil) {
SFSafariViewController *safariVC = [[SFSafariViewController alloc]initWithURL:[request URL] entersReaderIfAvailable:NO];
[self presentViewController:safariVC animated:YES completion:nil];
} else {
[[UIApplication sharedApplication] openURL:[request URL]];
}
return false;
}
return true;
Expand Down