uiwebview

How to Add “Write a Review” / “Rate Us” Feature to My App?

喜欢而已 提交于 2019-12-02 14:04:40
I wish to add some sort of a "Write a Review" or "Rate Us" feature to my app so my customers can easily rate and review my app. Best practice I can think of is to have some sort of pop-up or open a UIWebView within my app so the user is not kicked off of my app while opening the App Store application as done in: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://itunes.com/apps/myAppName"]]; Does anyone knows of a way to do that? StoreKit API (iOS 10.3 and up) As of iOS 10.3, the StoreKit API provides a way to request a review on the App Store without leaving your app.

uiwebview with header and footer

夙愿已清 提交于 2019-12-02 13:43:00
I am trying to add header and footer (both of them as UIViews ) but for some reason my footer sticks to the bottom, I'm using the KVO method for watching my content size. I'm presenting here the method where I think the problem is: - (void)updateLayout { // Update the frame of the header view so that it scrolls with the webview content CGRect newHeaderFrame = self.headerView.frame; CGRect newFooterFrame = self.footerView.frame; newHeaderFrame.origin.y = -CGRectGetMinY([self.webView convertRect:self.innerHeaderView.frame toView:self.webView.scrollView]); newFooterFrame.origin.y = self.webView

Content in UIWebView on iOS 3.1.3 appears zoomed on but on iOS 4.3 appears fine

天涯浪子 提交于 2019-12-02 13:07:23
问题 I am running into a difference in UIWebView behaviour on two different devices I am testing. First here is the listing of devices I am testing with... Device #1 -> iPod 2G / iOS 3.1.3 Device #2 -> iPhone 4 / iOS 4.3 I have the same HTML content being loaded on both devices but when it's loaded on the iPod the content appears zoomed in. On the iPhone the content appears correctly. From what I know I think this may have to do with retina display and perhaps the iPhone can natively accept

How do I handle return key on an iOS web view native keyboard?

怎甘沉沦 提交于 2019-12-02 12:55:33
In my iOS app, I have a UIWebView with text fields . I'd like to respond to the Return key being tapped. How do I do that? Can I somehow get access to the UITextField so I can implement UITextFieldDelegate method textFieldShouldReturn? Or is there some other way to accomplish this? You need to do some JavaScript tricks for this. In your HTML document, bind a keyup event callback for your text input control, (Last time I checked, somehow UIWebView doesn't fire keypress event for return key, so keyup event is your best alternative) In this callback, let the web view goto a custom URL scheme. e.g

Swift how to design UIWebView Auto resize full screen in Story Board

为君一笑 提交于 2019-12-02 12:33:40
I designed a UIWebView with 320x500 in StoryBoard. But when run in Iphone 6 Plus Simulator, i want to this webview full screen or scale with the screen of device. How to make it in storyboard? I wrote code in ViewDidLoad but not working. override func viewDidLoad() { super.viewDidLoad() self.detailWebView.frame = self.view.frame; println("H:\(self.view.frame.height), W:\(self.view.frame.width)") self.configureView() } Seem to be self.view.frame height and width that true, but size of this webview stills 320X500 In ViewDidLoad and when you use autolayout, the frame is not yet calculated. So,

Pdf file in UIWebview with password

两盒软妹~` 提交于 2019-12-02 12:28:40
I would like to specify the password of a PDF file in my request. Is this possible? Currently my code is as following: NSString *nomPdf=_pdffile.name; NSString *path = [[NSBundle mainBundle] pathForResource:nomPdf ofType:@"pdf"]; NSURL *url; NSURLRequest *request; if(path !=nil){ url = [NSURL fileURLWithPath:path]; request = [NSURLRequest requestWithURL:url]; } How can I pass the password string required of the PDF file in this code ? Not fully an answer, but to rule out options, it sounds like you can't embed the password as part of a URL. 来源: https://stackoverflow.com/questions/10519122/pdf

How to get rid of the status bar background on the UIWebView?

大城市里の小女人 提交于 2019-12-02 12:26:22
Since iOS 11, when the UIWebView is full screen, a fake background appears on the status bar with the same color of the UIWebView background. Anyone knows how to get rid of it? Even adding the IUWebView to a storyboard and make it full screen will make the status bar background to appear I've been trying to edit the size and some other properties of the UIWebView and none of them worked, but it's definitely something from the UIWebView. Also tried to see all the subviews and it's sizes and didn't see anything strange. Attached a screenshot, see the grey "statusbar", it disappears when

Navigating a Pdf using UIWebview not working in IOS 5

家住魔仙堡 提交于 2019-12-02 11:28:43
I have recently upgraded to Xcode 4 and I've found that an app which has worked perfectly well for over a year is now not working under Ios 5. The app navigates a Pdf in UIWebview and uses the following code to move to any page within the Pdf. [self.pdfNavigateController.webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.scrollTo(0, %d);", self.pdfNavigateController.scrollPosition]]; When I use any simulator from 4.2 down the code works perfectly but under the Ios 5 simulator the code wont work. Looking through the forum there seems to be a number of issues

objective c open links from UIWebView in safari

丶灬走出姿态 提交于 2019-12-02 10:37:55
I have a UIViewController subclass which includes a UIWebView and implements the UIWebViewDelegate. What i want to do is make links pressed in the UIWebView to open in safari. I've read past questions about this, but still can't make it work. Here is about what i've done: In the - (void)viewDidLoad method of my class i use the following code: [[self articleWebView] setDelegate: self]; [articleWebView loadRequest:requestObj]; I don't want to display the whole html page that is loaded in the articleWebView object, so in the -(void)webViewDidFinishLoad:(UIWebView *)webView method i use this:

Use Adobe Reader to open a PDF from own app using WebViewController

≡放荡痞女 提交于 2019-12-02 10:26:00
In my iPad app, I have a button that opens a document using a WebViewController to view the file. For certain PDF documents that were viewable in iOS4, opening them on iOS5 now crashes the app. The same thing happens in Mail if I try to view these PDF documents that are attached to emails. However, if I tap and hold in Mail and select "Open with Adobe Reader," the document opens successfully. Is there a way to change what is used to generate the view of the PDF in the WebViewController to use the Adobe Reader viewer, rather than the native PDF viewer? I would like to do this directly within