uiwebview

Reading .ppt (MS PowerPoint) file in Cocoa Touch

我是研究僧i 提交于 2019-12-12 10:43:45
问题 Any idea how to read a .ppt file in Cocoa Touch ? I tried to load the contents of the file in UIWebView but it didn't work. Here is the code : [aWebView loadData:[NSData dataWithContentsOfFile:filePath] MIMEType:@"application/vnd.ms-powerpoint" textEncodingName:@"utf-8" baseURL:[NSURL fileURLWithPath:filePath]]; [powerWeb loadData:[NSData dataWithContentsOfFile:filePath] MIMEType:@"application/vnd.ms-powerpoint" textEncodingName:@"utf-8" baseURL:[NSURL fileURLWithPath:filePath]]; All

How to replace buttons on a toolbar under UIWebView keyboard on iOS 6?

妖精的绣舞 提交于 2019-12-12 10:08:31
问题 How to replace buttons on a toolbar under UIWebView keyboard on iOS 6? The following code works fine on iOS 5.1 but doesn't work on iOS 6: UIWindow *keyboardWindow = nil; for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) { if (![[testWindow class] isEqual:[UIWindow class]]) { keyboardWindow = testWindow; break; } } for (UIView *possibleFormView in [keyboardWindow subviews]) { // iOS 5 sticks the UIWebFormView inside a UIPeripheralHostView. if ([[possibleFormView

Autorotation, UIWebView and UITabBarController

China☆狼群 提交于 2019-12-12 10:08:06
问题 I have the following View hierarchy: UITabBarController | UINavigationController | | | UIViewController (only supports Portrait rotation) | UINavigationController | | | UIViewController (only supports Portrait rotation) | UINavigationController | | | UIViewController (only supports Portrait rotation) | | | UIViewController (has UIWebView with movie in it) | UINavigationController | UIViewController (only supports Portrait rotation) The issue is now that when I display the UIWebView with the

Within a (BOOL)webView: How to open a URL clicked in UIWebView that opens a Modal UIWebView

[亡魂溺海] 提交于 2019-12-12 09:55:03
问题 Thanks for viewing my question. Let me describe the app first. I have a tab bar based app for iOS5.1 that is using storyboard and ARC. There are four tabs with a view controller in each one that shows a webview with local HTML files (each view is a different set of html files to display). Currently when a user touches a http or https link, it'll open in Safari. However, I now want it to open within app via a modal view. I currently have the interface created and ready to show, but I can't

jQuery Mobile is NOT triggering webViewDidStartLoad and webViewDidFinishLoad after leaving homepage in webView

戏子无情 提交于 2019-12-12 09:24:12
问题 I have a simple iOS app with a single view that contains a UIWebView. Within my webView, I display my jQuery Mobile website. Since jQuery Mobile loads pages via ajax, the webViewDidStartLoad and webViewDidFinishLoad methods are NOT called once the initial page loads. I've found similar questions on SO such as this one , but I'm not sure where to use the window.location = "localFunction" call, and no one has yet to confirm this actually works. Here's my issue (example): App Starts

How to detect the playing state of the audio in UIWebView in iOS?

我怕爱的太早我们不能终老 提交于 2019-12-12 09:13:49
问题 I have an UIWebView to load a html web link:http://m.y.qq.com in my iOS app. I don't know how to detect the playing state of the audio in UIWebView. I just need to know whether the audio in UIWebView is playing or not in my iOS app, so that I can do something. I have searched a lot from Stackoverflow and Google, but I can't find a satisfied answer. Can anyone give me some help? 回答1: You can check if audio is playing with isOtherAudioPlaying So in your UIWebView delegate methods you can use:

Delegate to know when phone call ends which was initiated by app

不想你离开。 提交于 2019-12-12 09:00:08
问题 I have a code which places a phone call using below code : // Make a call to given phone number - (void)callPhoneNumber:(NSString *)phoneNumber { if (!self.webview) self.webview = [[UIWebView alloc] init]; self.webview.delegate = self; // Remove non-digits from phone number phoneNumber = [[phoneNumber componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""]; // Make a call NSURL * url = [NSURL URLWithString:[NSString

removeChild sometimes removes entire span and sometimes doesn't

[亡魂溺海] 提交于 2019-12-12 08:57:54
问题 I'm working on a rich text editor for iOS and have most of it working but running into endless problems ensuring that the cursor is visible in the viewport when the user starts typing. I came up with a novel approach: insert a span at the cursor position, scroll to the span, and then remove it. (I haven't gotten to only scrolling if the span is on-screen.) Here's what I wrote: document.addEventListener('keypress', function(e) { jumpToID(); }, false); function jumpToID() { var id =

how to forward UIWebView scroll to UIScrollView ? (conditionally)

我的未来我决定 提交于 2019-12-12 08:45:17
问题 I have a UIWebView inside UIScrollView . This idea is to be able to create more reading space on screen when user scroll the webpage upwards - by scrolling the UIScrollView upwards till the toolbar is visible, and obviously when the toolbars is nomore visible actually scroll the webpage to show more content that's on the page. IPhone Safari browser does exactly the same functionality. see screenshot (first) for default behavior i am getting - i guess because : the scrolling message is

NSURLProtocol canInitWithRequest: called multiple times

懵懂的女人 提交于 2019-12-12 08:35:05
问题 Our app has a lot of web views in it and I recently added a NSURLProtocol to interceptor some of the requests from them. I've noticed that some of the web views are calling the +[NSURLPRotocol canInitWithRequest:] method multiple times with what appears to be exactly the same request. Sometimes 6 or 7 times. I'm trying to figure out why this might be occurring. Does anyone have any experience with this? I've logged out the [NSURL absoluteString] and httpMethod values and they are the same for