Search Results

Search found 472 results on 19 pages for 'uiwebview'.

Page 14/19 | < Previous Page | 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Combine Search Bar and URL Bar into One (WebView)

    - by Jay Bush
    So I'm in the midst of updating my Web Browser app for iOS devices, from the ground up, and I'm trying to implement some more convenient features. One feature that seems to be really popular now, that I have been getting a lot of requests for, is the combination of a Google Search bar and a URL bar in one, like that of the Chrome application. Below is a screenshot of the Google Chrome app, and as you can see, they've made it so you can either enter in a search query like "apple ipad" and it will return a Google search page of 'Apple iPad', or you can enter in a URL "http://apple.com/ipad/" and it will load that URL. I have looked all over the internet, but all I could find were tutorials on how to Search Google with value of the UITextField. I have a feeling that the best way to do this is to probably make a 'check'. Like if the entered value contains 'http://' 'www.' '.com' or no spaces, then load it as a URL, if not then load it in a Google Search page, and then have the webview load up the Google Search page. If anybody could show me to the right direction, that would be great, or even supplying me with some code would be even greater. :) Thanks! If anyone needs part of the code, just ask.

    Read the article

  • Rich Text Editor in Table view

    - by pubudu
    Im try to implement rich text editor in table view cell. before this i test rich text editor using web view.it work fine I want to put this web view inside my costume cell. i did it, but it not working (bold , italic ... styles) how can i pass stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Bold\") this command to webview in cell i did like this in viewContoller - (IBAction)clickbold:(id)sender { static NSString *CellIdentifier = @"Cell1"; Cell *cell = [_tableview dequeueReusableCellWithIdentifier:CellIdentifier]; cell = [_tableview cellForRowAtIndexPath:0]; [cell.webView stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Bold\")"]; [_tableview beginUpdates]; [_tableview endUpdates]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell1"; Cell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; { NSBundle *bundle = [NSBundle mainBundle]; NSURL *indexFileURL = [bundle URLForResource:@"index" withExtension:@"html"]; [cell.tableview loadRequest:[NSURLRequest requestWithURL:indexFileURL]]; cell.webView.delegate = self; [cell.webView stringByEvaluatingJavaScriptFromString:@"document.execCommand(\"Italic\")"]; return cell; } return cell; } my html file like this <html> <head> <script> function myFunction() { window.location.href = "myclick://buttonClicked"; } function onKEYPRESS() { window.location.href = "onkeypress://buttonClicked"; } </script> </head> <body> <body> <div id="content" contenteditable="true" style="font-family:Arial" onfocus="myFunction()" onkeypress="onKEYPRESS()">TEXT TEXT </div> </body> </html>

    Read the article

  • Got problem when uploading the html into the webview in iphone sdk.

    - by Monish Kumar
    Hi Guy's NSString* appendString=@""; appendString = [appendString stringByAppendingString:@"<body>"]; appendString =[appendString stringByAppendingString:@"<table background='footer.png' width='320' height='45' style='background-repeat:no-repeat'>"]; appendString =[appendString stringByAppendingString:@"<tr>"]; appendString =[appendString stringByAppendingString:@"<td align='left' width='57' height='31' style='padding: 6px 0 0 0' ><a href='/map/'><img src='details_Back.png'/></a></td>"]; appendString =[appendString stringByAppendingString:@"<td align='left' valign='middle' style='padding: 0 0 0 65px; font-family:Helvetica; font-size:21px ; font-weight:bold ; color:#FFF'>Details</td>"]; appendString =[appendString stringByAppendingString:@"</tr>"]; appendString =[appendString stringByAppendingString:@"</table>"]; appendString =[appendString stringByAppendingString:@"<br>"]; returnString = [returnString stringByReplacingOccurrencesOfString:@"<body>" withString:appendString]; printf("\n return string :%s",[returnString UTF8String]); [myWebView loadHTMLString:returnString baseURL:[NSURL URLWithString:@"http://abc.api.abcdefg.com/"]]; here in the above code the footer.png and details_back.png are the local images stored in my resource folder. Here the problem is I am gettin the background image from the server link I had passed to the webview as baseurl but the images footer.png and details_back.png which were stored in resource is not displayed. if I use the resource bundle as the baseurl then I am not displayed the background image from the server link. Can anyone please give me the suggestions to get rid of rid of this problem. thanks to all guy's, Monish.

    Read the article

  • Link to pdf within app

    - by Thijs
    I've got an iOS app that at one point opens a link to a website in a webview. These links are kept in a plist file (so it is easy to maintain them as the app evolves). What I want to do next is to also link to PDF's (or any picture of text file format, of even a html format, this is flexible) that are kept within the app. And I would like to do this as much as possible from within the existing app structure. So, is it possible to create a link that can be put in the plist as a web-link, but instead opens a file on the device itself (possibly in the webview)? And how would I go about that? Any ideas? Thanx in advance for your help!

    Read the article

  • WebView not responding when called from a method

    - by AragornSG
    I have an app with tabbar and webview. I'm trying to make the app come back to default url each time user taps the bar. Right now I'm intercepting taps and launching a method, however it's not affecting my webview. The same syntax for calling webview from awakeFromNib works, so I don't have a clue what's up. I suspect it's something to do with how I call the method, but I don't know what. Here is the code: #import "SecondViewController.h" @implementation SecondViewController - (void)awakeFromNib { NSString *loadURL = [NSString stringWithFormat:@"http://pageurl"]; // [secondView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:loadURL]]]; SecondViewController *ptr = [[SecondViewController alloc] init]; [ptr goToPage]; } - (void) goToPage { NSLog(@"go to page"); NSString *newURL = [NSString stringWithFormat:@"http://pageurl"]; [secondView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:newURL]]]; } Thanks fot your help!

    Read the article

  • Screenshot Of webView with full image quality

    - by iPhone Developer
    I am trying to take a screenshot of a webView and change it to PDF. I have used this method: http://www.ioslearner.com/wp-content/uploads/2012/01/HtmlToPdfDemo.zip I mean the code in this project. It works fine for iPad but it doesn't covers full width for iPhone. I have used -sizeThatFits: for the webView, but that gives unreadable images for large html pages. I have searched a lot but all I could find out was in Android.. not iPhone. Please help me.Thanks!

    Read the article

  • xcode - ipad app. UIWebView Remember login info

    - by Aakburns
    I'm working on an application to run base camps website only. I need it to work when you login and press "Remember me on this computer" I'm not sure how to set it up to actually remember your login and keep you logged in when you come back to the app. Is there a way to 'save' the state of the application when you quite it and come back to what you were doing? Here is an image of the login form on the website used in the application. http://arikburns.com/forums/fn/IMG_0005.PNG Thanks.

    Read the article

  • Using images and css file for a generated HTML UIWebView

    - by Tom
    Hi! I'm generating an HTML file for an app, and in this HTML file there's a link to a stylesheet and one to an image. Here's what I tried so far: NSMutableString *toReturn = [NSMutableString stringWithCapacity:100]; NSString *cssPath = [[NSBundle mainBundle] pathForResource:@"etapes.css" ofType:nil]; [toReturn appendFormat:@"<html><head><title></title><link href=\"%@\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" /></head><body>", cssPath]; It generates the right full path to the right file, this is okay if I want to access it on my mac, but on the simulator or my iPhone it doesn't point to the right place at all... Do you have any idea of how could I make this? Thanks

    Read the article

  • Get content length from UIWebView

    - by g0ld2k
    I am looking to find out if a web page has changed, I was going to use the content length of the web page but have not seen a way to do so. Any ideas? Or can anyone think of another way to check periodically if a web page has changed? Any ideas are appreciated. Thanks, Chris

    Read the article

  • How to avoid keyboard hide & show when focus changes from UITextField and UIWebView?

    - by Manoj
    I have a requirement in which the view contains one native UITextField and one UIWebView. The issue is if I switch the focus from UITextView to UIWebView, the keyboard window flicker(hides and then shows). ie, I got UIKeyboardWillHideNotification and UIKeyboardDidShowNotification But, this is not happening when I switch the other way. ies, I got only UIKeyboardDidShowNotification Is there any way to avoid this flickering effect? Note: I also notices if I have multiple UITextField and UIWebView, this issue is not happening with the same type of views.

    Read the article

  • Dynamically replace HTML element in UIWebView

    - by Skie
    I have some HTML loaded in WebView like this: <html><head></head><body>before <myTag>Content</myTag> after</body></html> I want to replace element myTag with custom text so it should look like: <html><head></head><body>before ____MY_CUSTOM_TEXT___ after</body></html> Also I can't change initial HTML. How I can do this with JavaScript? My not finished code: var elements = document.getElementsByTagName( 'myTag' ); var firstElement = elements[0]; var parentElement = firstElement.parentNode; var html = parentElement.innerHTML; parentElement.innerHTML = html.replace(?????, '____MY_CUSTOM_TEXT___'); I don't know how to get string value of element to replace (?????).

    Read the article

  • UIWebview :: Text :: HTML :: JS

    - by user306089
    hello, 1- i load a text from a txt file 2- i show it into a html "file" 3- problem : 3-a : this code works : i create my page by code and i insert my text myText = ... loaded from an array of texts ...; NSString *myDescriptionHTML = [NSString stringWithFormat:@"<html> \n" "<head> \n" "<style type=\"text/css\"> \n" "body {font-family: \"%@\"; font-size: 1.0f + 'em'; color:#FFF;}\n" "</style> \n" "</head> \n" "<body id=\"myid\">%@</body> \n" "</html>", @"Arial", myText]; [self.myWebView loadHTMLString:myDescriptionHTML baseURL:nil]; 3-b but this one does not work : i load a html page already created and i inject my text into using JS : myText = ... loaded from an array of texts ...; [self.myWebView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.getElementById(\"myid\").innerHTML = \"%@\";", myText]]; 3-c but this one working : same as 3-b but i init my text with a string in the code itself : myText = @"hello all"; [self.myWebView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.getElementById(\"myid\").innerHTML = \"%@\";", myText]]; any help to understand what's wrong with 3-b ? thank you

    Read the article

  • Redrawing content of UIWebView

    - by btate
    I have a bunch of webviews with static html content that I'm putting in a scroll view as pages. That works fine, but having 20 something full screen subviews of the scroll view is causing some lag. I solved that by only placing 5 at a time in there. The current view, and the two next and two previous. The problem now is that any web view that is not a subview of the scroll view is not drawing correctly based on the device orientation. The frame of the webview is printing out correct, but the actual content is drawing in portrait mode. So there is essentially a strip of blank space to the right of the content. How do I go about re rendering the content without reloading the page? Here's the relevant code: - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation) fromInterfaceOrientation{ [self resizeSubViews]; } - (void) setupWebViews{ if(_webViews == nil) _webViews = [[NSMutableArray alloc] init]; // This is where the navigation would come into play as far as loading up available web views [_webViews removeAllObjects]; // for loop here to create web views for (int i = 0; i < 20; i++) { //CDCWebViewController *webView = [[[MyInternalWebView alloc] initWithFrame:_webViewWrapper.frame] retain]; MyInternalWebView *page = [[[MyInternalWebView alloc] init] retain]; [page loadRequest:[NSURLRequest requestWithURL:_url]]; [page setCdcIWVdelegate:self]; [page setTestIndex:i]; [page setPageIndex:i]; [_webViews addObject:page]; [self loadScrollViewWithPage:i]; } [self clearUnusedWebViews:_pageControl.currentPage]; } - (void) setupWebViewWrapper{ // a page is the width of the scroll view _webViewWrapper.pagingEnabled = YES; _pageControl = [[[UIPageControl alloc] init] retain]; _webViewWrapper.showsHorizontalScrollIndicator = NO; _webViewWrapper.showsVerticalScrollIndicator = NO; _webViewWrapper.scrollsToTop = NO; _webViewWrapper.delegate = self; _pageControl.numberOfPages = [_webViews count]; _pageControl.currentPage = 0; } - (void) resizeSubViews{ // The frame is set in IB _webViewWrapper.contentSize = CGSizeMake(_webViewWrapper.frame.size.width * [_webViews count], _webViewWrapper.frame.size.height); // Move the content offset. _webViewWrapper.contentOffset = CGPointMake(_webViewWrapper.frame.size.width * _pageControl.currentPage, _webViewWrapper.contentOffset.y); for (MyInternalWebView *subview in _webViewWrapper.subviews) { // Reset the frame height and width here? CGRect frame = _webViewWrapper.frame; frame.origin.x = frame.size.width * subview.pageIndex; frame.origin.y = 0; [subview setFrame:frame]; } } //***************************************************** //* //* ScrollView Functions //* //***************************************************** - (void)loadScrollViewWithPage:(int)page { // Make sure we're not out of bounds if (page < 0) return; if (page >= [_webViews count]) return; MyInternalWebView *webView = [_webViews objectAtIndex:page]; // Add the preloaded webview to the scrollview if it's not there already if (nil == [webView superview]) { CGRect frame = _webViewWrapper.frame; //NSLog(@"width = %f", frame.size.width); frame.origin.x = frame.size.width * page; frame.origin.y = 0; //NSLog(@"setting frame for page %d %@", page, NSStringFromCGRect(frame)); [webView setFrame:frame]; [_webViewWrapper addSubview:[_webViews objectAtIndex:page]]; // Now that the new one is loaded, clear what doesn't need to be here [self clearUnusedWebViews:page]; } } - (void) clearUnusedWebViews: (NSInteger) page{ for (int i = 0; i < [_webViews count]; i++) { if ((page - i) <= 2 && i - page <= 2) { continue; } [[_webViews objectAtIndex:i] removeFromSuperview]; } } - (void)scrollViewDidScroll:(UIScrollView *)sender { // Switch the indicator when more than 50% of the previous/next page is visible CGFloat pageWidth = _webViewWrapper.frame.size.width; NSInteger page = floor((_webViewWrapper.contentOffset.x - pageWidth / 2) / pageWidth) + 1; _pageControl.currentPage = page; // load the visible page and the page on either side of it (to avoid flashes when the user starts scrolling) [self loadScrollViewWithPage:page - 2]; [self loadScrollViewWithPage:page - 1]; [self loadScrollViewWithPage:page]; [self loadScrollViewWithPage:page + 1]; [self loadScrollViewWithPage:page + 2]; }

    Read the article

  • iPhone: How to read contents from UIWebView XML Document?

    - by David Conlisk
    Hi all. In my iPhone app I'm using a UIWebView to allow the user to browse to an XML document on a website. When the user has found the xml document they want, they click a button below the UIWebView. Then I try to read the contents of the XML document from the UIWebView using: NSString *xml = [webView stringByEvaluatingJavaScriptFromString:@"document.getElementByTagName('rootXmlNodeName')[0].innerHTML"]; This doesn't work for me for XML documents. It works fine in a HTML page, e.g. using "html" for the rootXmlNodeName in the code snippet above. Any ideas? Thanks in advance!

    Read the article

  • problem with iOS 4.2 when user press the list view item to go to UIwebview page and the navigation button disappears on the second visit

    - by seahorse
    My app is a Navigation based application. The main menu contains the list view items. if I clicks one of them, it goes to next view which in this case take me to UIwebview embedded web site. Everything is looking great. I can view the content of web page, the navigation control back button which takes to the main menu if I press it. However, I'm having issue when I try to go back to main menu if i visit that subview the second time. It loads the content of UIwebview web page, but the navigation button is gone and won't let me go back to main menu. This problem only appears on latest iOS 4.2 version. Otherwise it works great on 3.1 to 4.1. I would appreciate any hints or inputs. Note this seems not working for subview using UIWebview embedded web content. I don't have any issue with other subviews

    Read the article

  • How to save the content in UIWebView for faster loading on next launch?

    - by erotsppa
    I know that there are some caching classes introduced in the iphone sdk recently, and there is also a TTURLRequest from three20's library that allows you to cache a request to a URL. However, because I am loading the web page in UIWebView by calling UIWebView's loadRequest, those techniques are not really applicable. Any ideas how I can save a web page so that on next app launch, I don't have to fetch from the web again for the full page? The page itself already have some ajax mechanism that updates parts of itself automatically.

    Read the article

  • UIWebView loading progress and adjust web page to fit the view page?

    - by user262325
    Hello everyone I am using UIWebView to load a web page. There are 2 questions: 1.It it possible to track the percentage progress when UIWebView is loading the page? 2.I know there is property scalesPageToFit scalesPageToFit A Boolean value determining whether the webpage scales to fit the view and the user can change the scale. I try to set it to YES, but it looks like that it is not in public API and my app stopped with black screen, I am not sure what is wrong? Welcome any comment Thanks interdev

    Read the article

  • UIWebView frame resize does not resize the inner content...

    - by Markus Gömmel
    Hi, if I change the frame of a UIWebView (scalesPageToFit property is YES), what do I have to do that the zooming level of a currently displayed webpage persists? Let's say I have a UIWebView frame with a width of 200 pixels, and has zoomed into a website so that only one column is visible. After changing the width to 300, I still see the column with the same size, and additional space at the left and right. But what I would need is that I still only see this column, but bigger. Any ideas what I have to do to achive this? I tried a lot of things, but nothing worked so far. By the way, the iPhone built in Safari browser does exactly this thing (with the same website, so it's not content related) when rotating the iPhone... I see the same content, bug bigger, NOT more content as it happens with my current version of code. Thanks for helping! Markus

    Read the article

  • Resizing UIView to match its content

    - by Thody
    I have a UITextField, a UIButton, and a UIWebView nested in a UIView, which is nested in a UIScrollView. After the UIWebView has loaded its content, I need it to resize the UIWebView and UIView so that the UIScrollView will scroll. I currently have the UIScrollView getting its contentSize from the UIView, but I can't figure out how to do the resizing after the UIWebView's content has loaded.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19  | Next Page >