uiwebview

passing text from an Array to UIWebView

做~自己de王妃 提交于 2019-12-12 01:55:06
问题 i want to pass some html i have saved as string and stored in an array into a UIWebView. can anyone help me on how to do this because all i can find is how to grab it from the internet rather than already stored data Thanks 回答1: Are you trying to provide generated HTML content to a UIWebView? If so, you'll want to use -[UIWebView loadHTMLString:baseURL:] . You can pass your HTML string for the first argument, and nil in for the second argument. 来源: https://stackoverflow.com/questions/2713388

Can't show a keyboard on UIWebView on new project on xCode 4.4

孤街醉人 提交于 2019-12-12 01:49:21
问题 I have just created a new Single View Application on xCode 4.4. And it was created with .storyboards files (instead xib). Then I have added a UIWebView. And now I can't show a keyboard by the code line: [self.window MakeKeyAndVisible]; Because there is no any window on ViewController.m. How to force showing a keyboard on UIWebView on this new xCode project template? Thanks a lot for the help! 回答1: You can always get the window property from the UIApplicationDelegate object. Since this is a

UIWebview on scroll event

蓝咒 提交于 2019-12-12 01:45:21
问题 I want to know how to call a method in the event that a user has stopped scrolling on a page inside UIWebview. Does anyone know how to do this? 回答1: UIScrollView has also a subView of the UIWebView : So you can fire at the delegate of UIScrollView's : webView.scrollView.delegate = self - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { //Do your Stuff } - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { if (!decelerate) { //Do your

How To Detect iOS Different Device Using Javascript?

戏子无情 提交于 2019-12-12 01:39:05
问题 I am trying to create Javascript with Objective C related application. I am rending javascript content page on UIWebview . The UIWebview content page view I want to differentiate sizes based on device model into iOS . How to make differentiate device detection using javascript. My Code Below : // iPhone 3 if (window.screen.height==480 && window.screen.width==320 && window.devicePixelRatio==1) { $('#chartDivWrapper').html('<div id="chartdiv" style="height:300px;width:500px;"></div>'); } //

fade View IN and OUT

你。 提交于 2019-12-12 01:19:04
问题 Good Morning everyone, I'm totally confused with this problem. I have 3 UIWebViews and what should hapen is webView1 fades in (that works) fades out und WebView2 fades in...... I made it so far with: CATransition *Animation = [CATransition animation]; [Animation setDuration:4.0]; [Animation setType:kCATransitionFade]; [Animation setSubtype:kCATransitionFade]; [Animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; transitioning = YES; if

decoding problem uiwebview

扶醉桌前 提交于 2019-12-12 01:16:13
问题 i am using uiwebview in my application. there are some links when user clicks a http search starts. it works fine but i have problems while getting "%58 den ysnky'ye tepki" it is given as "X'den ysnky'ye tepki". it has problems with % char. identifier:%58'den%20ysnky'ye%20tepki decoded identifier:X'den ysnky'ye tepki i am using stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding to decode the string like that; NSLog(@"identifier:%@", identifier); identifier = [identifier

Locate a html file in UIWebView

雨燕双飞 提交于 2019-12-12 00:24:02
问题 I have a NotificationVC containing table view having 10 cells index 0 to 9. on click of each cell NotificationWebVC should open up that has a UIWebView that loads diff. html depending upon which cell is selected in NotificationVC. Right now my code works only for index=0 , but not for other indexes , seems bit weird. NotificationWebVC - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. NSString *htmlFile = [[NSBundle mainBundle] pathForResource:

Undeclared delegate and shouldStartLoadWithRequest

限于喜欢 提交于 2019-12-11 23:23:07
问题 i am newer to coding in general! I am trying to create a webview that doesnt allow navigation to viewers. I have most of the coding typed up, but i have two undeclared errors and i am not sure how to solve this issue. What i am trying to do is create a webView, but i would like to make it where the viewer of the webView cant navigate to other pages. If he/she does attempt too it does not fulfill the request.So basically it stays specifically on one page. If i just need declare them in a

Login with google plus with out opening external browser in iPhone

独自空忆成欢 提交于 2019-12-11 23:01:39
问题 My app was recently rejected, because I am using Google Plus Login integration with external browser. So read a few threads, and found a solution to create UIApplication class to handle external browser, and use default UIWebView . I have done everything, but I have a problem to open google login page in UIWebView . Here is my code. LoginWithGoogle.h #import <UIKit/UIKit.h> #define ApplicationOpenGoogleAuthNotification @"ApplicationOpenGoogleAuthNotification" @interface LoginWithGoogle :

how to decrease the height of content area for <p> with css?

房东的猫 提交于 2019-12-11 21:51:15
问题 Could anyone tells me how to decrease the height of the content area for p tag with css? I want to, 1. bring the bottom orange dotted line closer to the text above. (border-bottom: 3px orange dotted;) 2. reduce the height of the yellow highlighting box. (body { background-color:yellow }) adjusting the properties "line-height" and "height" don't help... Thanks! 回答1: You should be able to change the height with the "line-height" property make sure there is not another css overwriting it. to