uiwebview

Detect when MathJax has finished loading in UIWebView

我们两清 提交于 2019-12-08 09:38:44
问题 I've got an interface that consists of a few UIWebViews, all of which are dynamically fed HTML, infused with MathJax javascript, which are used to display quite a few equations in the window. The MathJax is stored locally, and gets parsed through the method outlined in this tutorial: http://new2objectivec.blogspot.co.uk/2012/03/tutorial-how-to-setup-mathjax-locally.html Unfortunately, I'm not adept in javascript, and the MathJax scripts seem to be fed into NSStrings through quite a convoluted

Capture print requests from a UIWebView

假装没事ソ 提交于 2019-12-08 09:37:29
问题 I have an app that is a wrapper for a website. It allows us to use a third party web app for some services in our business. One of the things it will do is print labels. In mobile safari if I do the setup and press print, the request is processed in safari and I can print without any issue using air print. Inside of my custom app the uiwebview makes the same request however nothing is sent to the printer. I have added a popover that I can manually submit a print job, but I can't manage to

Can I subclass UIMenuController so that it can take icons instead of just text?

倾然丶 夕夏残阳落幕 提交于 2019-12-08 09:21:34
问题 How would one go about doing this? I'm looking for a dense, purely graphical menu on tap-hold. 回答1: In 3.2 you can add menu items using the menuItems property. But I think subclassing won't be useful, since it's a singleton that does not returns the views of each menu item. You could access menuFrame when setMenuVisible:animated: is called, so you can add you're own view that looks like a menu items with icons. But for adding icons to the system menu items... I think you should stick to what

UIWebView's zoom range is very limited

≡放荡痞女 提交于 2019-12-08 09:18:21
问题 I have a test UIWebView. I loaded a small amount of custom HTML into it. Nothing special -- two pages, a little text, and a small image on one of the pages. I am using it to test out the class. One problem I am having is that my ability to zoom in and out is very limited. It seems that even if I set the minimumZoomScale and maximumZoomScale properties of the UIWebView's UIScrollView, something resets them to a factor of 1.5 or smaller ratio. And if I try to set them often, the app gets very

UIWebView detect when javascript is loading a new page

大兔子大兔子 提交于 2019-12-08 09:10:16
问题 I have a UIWebView and I want ALL links to open on a new page. I have this code to detect when a user clicks a link and open that link on a new page: - (BOOL) webView:(UIWebView*)webView shouldStartLoadWithRequest: (NSURLRequest*) request navigationType: (UIWebViewNavigationType)navigationType { //If the user clicked a link don't load it in this webview if (navigationType == UIWebViewNavigationTypeLinkClicked) { NSURL* URLToGoTo = [request URL]; self.fullWebView.url = URLToGoTo; [self

how to detect when UIWebView starts selecting text?

喜欢而已 提交于 2019-12-08 08:59:23
问题 I have a UIWebView which shows static content and reacts to various swipe gestures through its controller. The text selection has been disabled but now I am working on a new feature to allow text selection and present a custom context menu. Now I need to be able to detect when the text selection is active so that I can turn off the swipe gestures. The only method I can think of is to check if there is selected text using JS in the swipe handler methods. Any other ideas? Does anybody know how

NSURLConnection delegate method: didReceiveData not called …Why ?? (iPhone SDK)

孤人 提交于 2019-12-08 08:42:21
问题 Sample Code: -(void)ConnectWithRequest:(NSMutableURLRequest*)req{ if(![req isEqual:theRequest]){ [req retain]; [theRequest release]; theRequest = req; } XMLConnection = [[XMLWebServiceConnection alloc]init]; Connection=[[NSURLConnection alloc]initWithRequest:theRequest delegate:XMLConnection]; } In XMLConnection class I have implemented NSURLConnection delegate methods: -(id)init{ if(self=[super init]){ receivedData = [[NSMutableData alloc]init]; //member of a class } return self; } - (void

iOS WebView Not Releasing

耗尽温柔 提交于 2019-12-08 08:26:58
问题 I am designing an HTML page optimized for iOS that utilizes css. When the user taps the button, it is supposed to fade out and then fade back in. However, it does not fade back in, the opacity stays at 50%. Here is the CSS that I am using: .increaseFont{ opacity:1.0; } .decreaseFont{ opacity:1.0; } .increaseFont:hover{ opacity:0.5; } .decreaseFont:hover{ opacity:0.5; } Before Tap: After Tap: Any ideas on why this occurs? 回答1: So if I understand when the user puts the their finger effectively

Get notifications when a Dailymotion video is played into a UIWebView

别来无恙 提交于 2019-12-08 08:23:09
问题 I'm currently showing a dailymotion url directly into a UIWebview. When tapping on the thumbnail image, the video starts playing in fullscreen mode. The problem is: when the video stops playing or the user tapps the "done" button, the original thumbnail has disapeared from the UIWebview, making it impossible to launch the video again. I would like to control when the video has finished playing or the user has tapped the done button to reload the UIWebView. I've been looking around and playing

XCode iO6: UIWebView Returns Black Screen After Returning from Choosing a Photo

99封情书 提交于 2019-12-08 08:14:49
问题 Here are the sequence of events which cause my app to return a black screen: 1.) I select a button on my website via the app's UIWebView that allows me to change my profile picture. 2.) The app pulls up the three standard options from the bottom of the screen: "Take Photo or Video", "Choose Existing", "Cancel" 3.) If I choose either of the first two options and then choose or take a photo, my app returns to display a black screen. The profile picture is not changed. I also notice that the