uiwebview

NSUserDefaults not getting stored string value

雨燕双飞 提交于 2019-12-25 05:30:05
问题 I have UIWebView for reading content. After that i select some text from content stores in string using NSUserDefaults in Viewcontroller. Then i retrieve this string value and displays in UITextView to viewcontroller1. But the UITextView is not updating text from viewcontroller. The NSUserDefaults also not getting updating text. Im using [self.navigationController pushViewController:viewcontroller1 animated:YES]; for switch to viewcontroller1. viewcontroller: [wbCont loadHTMLString:webString

Push Notification - View Button action

寵の児 提交于 2019-12-25 05:14:18
问题 i have a working App witch sends without any problems my Push Notifications. After clicking the "View" Button of the Push - the App is open, but a blank screen is seen, without any content. How will i get it to work, that after clicking the View Button i will see "Content" in the App? My idea is (for example): I receive a Push Notification with the following Content: Today you get a Discount of 30% in our Shop After clicking View i will get into the App and can read the full Message with all

Getting Blank Screen in WebView using Swift

北慕城南 提交于 2019-12-25 05:05:00
问题 I am making a simple webview using Swift 3 . But after run am getting only the blank screen. It is not opening the link which I put in url request. import UIKit class ViewController: UIViewController { @IBOutlet var webView: UIWebView! override func viewDidLoad() { super.viewDidLoad() let url = URL (string: "http://www.google.net"); let request = URLRequest(url: url!); webView.loadRequest(request); // Do any additional setup after loading the view, typically from a nib. } override func

iAd on webview - iphone

谁说胖子不能爱 提交于 2019-12-25 04:41:02
问题 I have a big problem, I have an app with a database, inside this database I stored an html page that i display on a uiwebview...there is a way for put an iAd inside webview? 回答1: Don't put the iAd view in the UIWebView, make the UIWebView smaller and add the iAd view as a sibling of the UIWebView. 回答2: The iAd framework has a didFailToReceiveAdWithError: method that will get called if there is an issue pulling a new ad. If you have an Apple Developer account there is a video from WWDC 2010

UIWebView & NavigationController crashes while loading

跟風遠走 提交于 2019-12-25 04:01:33
问题 I have very weird problem I build a simple app with UIWebView and NavigationController but the problem is when the seconds page is loading and I go back to the first page and visited a link the APP crashes and the console says nothing Here is my code on finish loading -(void)webViewDidFinishLoad:(UIWebView *)aWebView { NSString *str = [aWebView stringByEvaluatingJavaScriptFromString:@"document.title"]; self.navigationItem.title = str; [navigationActivity stopAnimating]; } and this for the web

Memory Leak while using UIWebView Load request in IOS4.0

不羁岁月 提交于 2019-12-25 03:52:03
问题 I have a Web View Which loaded as a modal view. I am having memory leaks after loading a webpage using the following code. [myView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30]]; My dealloc method is below: - (void)dealloc { myView.delegate = nil; [myView release]; [url release]; [super dealloc]; } Instruments showing 5 blocks of GeneralBlock 32 leaks, but no stack trace available. The leak Happens

calculating UIWebView height with images gives wrong answer

岁酱吖の 提交于 2019-12-25 03:35:21
问题 I found how to calculate dynamic uiwebview height according to its content. My code is : println("webViweDidFinish started") var frame:CGRect = myWebView.frame frame.size.height = 1 var fittingSize :CGSize = myWebView.sizeThatFits(CGSizeZero) frame.size = fittingSize myWebView.frame = frame var contentsizeHeight = webView.scrollView.contentSize.height var yCoordinateOfWebView = myWebView.frame.origin.y var contentHeight: CGFloat = webView.scrollView.contentSize.height; myScrollView

calculating UIWebView height with images gives wrong answer

馋奶兔 提交于 2019-12-25 03:35:05
问题 I found how to calculate dynamic uiwebview height according to its content. My code is : println("webViweDidFinish started") var frame:CGRect = myWebView.frame frame.size.height = 1 var fittingSize :CGSize = myWebView.sizeThatFits(CGSizeZero) frame.size = fittingSize myWebView.frame = frame var contentsizeHeight = webView.scrollView.contentSize.height var yCoordinateOfWebView = myWebView.frame.origin.y var contentHeight: CGFloat = webView.scrollView.contentSize.height; myScrollView

is that UIWebView player a MPMoviePlayerController instance, and how to get a reference to that instance?

断了今生、忘了曾经 提交于 2019-12-25 03:22:25
问题 I need to play a youtube video in UIWebview and handle the event when user click the DOne button and when the video finish playing. I think of the solution that will handle the event that sent from UIWebview's media player. My question is: 1. is that the UIWebview's media player a MPMoviewPlayerController? 2. How do i refer to that instance and handle the event it sent out (such as: pause, stop, done, finish playing...) Thanks. 回答1: 1. is that the UIWebview's media player a

UIWebview creating SVG 'on the fly'

房东的猫 提交于 2019-12-25 03:21:53
问题 This is a continuation from a previous post regarding manipulation of SVG in a UIWebview. For more background info please see here first: UIWebview manipulating SVG 'on the fly' Now I am trying to create SVG on the fly within the same frame work. I have tried using the createElementNS method in Javascript without success. Here is my failed attempt: NSString *string = @"var svgDocument=document.getElementById('circle').getSVGDocument();var shape=svgDocument.createElementNS('http://www.w3.org