Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Links in the Info Panel Externally in Safari #173

Closed
theBrandonWu opened this issue Mar 12, 2014 · 4 comments
Closed

Open Links in the Info Panel Externally in Safari #173

theBrandonWu opened this issue Mar 12, 2014 · 4 comments

Comments

@theBrandonWu
Copy link

I wanted to add a link in the info panel where readers can go to our website in Safari instead of inside the view which has limited space. I found the issue in the previous repository Simbul/baker/issues/1183 but there wasn't an answer. Adding the following code to ShelfViewController.m seems to do the trick — this forces all links in the info panel to open externally in Safari though regardless of the Referrer, unlike in the magazine issues.

-(BOOL) webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest navigationType:(UIWebViewNavigationType)inType {
    if ( inType == UIWebViewNavigationTypeLinkClicked ) {
        [[UIApplication sharedApplication] openURL:[inRequest URL]];
        return NO;
    }
return YES;
}
@bobwol
Copy link

bobwol commented Mar 12, 2014

Do you have any idea on how to open in modal view, just like respecting the referrer=baker?

@feralbob
Copy link

I think that code would have to be added, for the info panel. I don’t have the code in front of me to verify

B

On Mar 12, 2014, at 4:21 PM, robsonw [email protected] wrote:

Do you have any idea on how to open in modal view, just like respecting the referrer=baker?


Reply to this email directly or view it on GitHub.

@bobwol
Copy link

bobwol commented Mar 13, 2014

I was looking through the code and I think will have to get the link handle part present in the BakerViewController and replicate in ShelfViewController. I will make some experiments....and see what happens.

@Marzio1
Copy link

Marzio1 commented May 11, 2014

The code added to ShelfViewController.m works perfectly.
But I would like that the links open into the app full screen (closing the box info) and with a button to close the linked page and return to the library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants