Search Results

Search found 534 results on 22 pages for 'webview'.

Page 20/22 | < Previous Page | 16 17 18 19 20 21 22  | Next Page >

  • iPhone SDK - Display more information about a selected CustomCell (custom UITableViewCell)

    - by Pittor
    If got a CustomCell loaded using: NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil]; I have no problems with the tableview but when I select a row I want display more information on that row(like facebook app)... using the typical "show more". At the beginning the row show "title" and "description". When I select that row i want to show "title", "description" and a webview... and, of course, make the row bigger to accommodate that objects. Maybe changing this CustomCell by another bigger CustomCell? I have no idea where to start. Thanks. Sorry for my english :S

    Read the article

  • Is this considered as using private functions in iPhone dev, and thus illegal?

    - by user153231
    I'm trying to disable scrolling for a UIWebView and the only way i found is using this way: #import <objc/runtime.h> id scroller = [[Webview subviews] lastObject]; int count; Method *method = class_copyMethodList([scroller class], &count); int i; for (i=0; i<count; i++) { if (strcmp(method_getName(method[i]), "setScrollingEnabled:") == 0) break; } IMP test = method_getImplementation(method[i]); test(scroller, @selector(setScrollingEnabled:), NO); Is this considered to be an illegal way of using the iPhone SDK? Can this cause my application to be rejected for the App store?

    Read the article

  • XMLHttpRequest progressive download?

    - by StackedCrooked
    Just for fun I was creating a JavaScript console for controlling my PC. It involves a small webserver that takes command strings and forwards those to the system using popen calls (to be more specific popen4 on a Ruby mongrel server). The stdout channels are redirected to the http response. The problem is that the response only arrives once the entire contents of stdout has been sent. This is ok for small commands, but not for a command like find / which lists all the files in the system. In such situations it would be nice to have the results shown progressively in the webview (just like in the regular terminal). I thought that using XMLHttpRequest synchronously might result in progressive downloading, but it doesn't seem so. Is there any way to make it work?

    Read the article

  • How to add "loading" screen for UIWebView app each time new page is being loaded?

    - by AragornSG
    I have an app that works with tabs and webview. I already have it setup to refresh the page assigned to a tab each time the item on tabbar is selected. My problem now is that it takes some time to load the page and it's impossible to say if the page being displayed is the old or refreshed one. What I want to do is add a "loading" screen (a simple image) which will be displayed until the refreshed page is loaded. Here is the function I run on each tab tap: - (void) goToPage:(NSString *)sid { NSString *newURL = [NSString stringWithFormat:@"%@/mykingdom.php?sid=%@", appURL, sid]; [secondView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:newURL]]]; } Thanks!

    Read the article

  • generating function arguments in java

    - by aloishis89
    I'm very new to java and am working on my first Android app. I am using the webview demo as a template. I am trying to generate a random integer between 1 and 12 and then call a certain javascript function based on the result. Here's what I have: int number = 1 + (int)(Math.random() * ((12 - 1) + 1)); number = (int) Math.floor(number); String nextQuote = "javascript:wave" + number + "()"; mWebView.loadUrl(nextQuote); So mWebView.loadUrl(nextQuote) will be the same as something like mWebView.loadUrl("javascript:wave1()") I just want to know if what I have here is correct and will work the way I think it will. The application isn't responding as expected and I suspect this bit of code is the culprit.

    Read the article

  • UIWebview isn't displaying content I want it to display

    - by Knodel
    In my app I have a UIWebView which loads different rtf files. I use this function to load these files: - (void)loadFile:(NSString*)file { NSString* resourcePath = [[NSBundle mainBundle] resourcePath]; NSString* sourceFilePath = [resourcePath stringByAppendingPathComponent:file]; NSURL* url = [NSURL fileURLWithPath:sourceFilePath isDirectory:NO]; NSURLRequest* request = [NSURLRequest requestWithURL:url]; [webview loadRequest:request]; } The UIWebView displays nothing. When I enter the debugger, the file string value is which I need, but resourcePath and sourceFilePath values are "nil". What am I doing wrong? Thanks in advance!

    Read the article

  • Load local Html file doesn't refer the js file in UIWebView

    - by Hero Vs Zero
    I am working with UIWebView project and I want to load an HTML file from a project resource. It is working fine when I run from the URL, but when I view the HTML file locally, JS files are not loaded. Loading the local HTML local file doesn't refer to js files in UIWebView. Here's my code to load the HTML file project local resource and does't refer the js file: NSString *path = [[NSBundle mainBundle] pathForResource:@"textfile" ofType:@"txt"]; NSError *error = nil; NSString *string = [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error]; NSString *path1 = [[NSBundle mainBundle] bundlePath]; NSURL *baseURL = [NSURL fileURLWithPath:path1]; NSLog(@"%@ >>> %@",baseURL,path); [webview loadHTMLString:string baseURL:baseURL]; This code doesn't find JS files in UIWebView, even though it loads image files from the project resource successfully.

    Read the article

  • Android - Can display a single Activity using two layout.xml files?

    - by Avadhani
    I had developed Android app having some screens with common UI format. The format in top-down approach is: Title Header (Two buttons, ImageView) Content Area- It will differ among Activities (contains ListView, Tabs, Buttons, TextView, WebView....) Footer Layout (Relative Layout with three Imagebuttons) I want to reformat the code in such a way that one xml contains Title Header and Footer Layout and other xml contains ListView,Tabs, Buttons.. based on the usage. Can i acheive this? Please help me with sample code/links....

    Read the article

  • Why isn't my javascript working on a local HTML file using UIWebView loadRequest:?

    - by Raphael
    Hi Everyone, I have a script that generates a temporary HTML file that has links to external Javascript files that it requires to run. <script src="file:///Users/raphaeldefranco/Library/Application Support/iPhone Simulator/User/Applications/BA9E724E-76BD-4F28-B224-54B4C73786D6/LogTen.app/Reports/Time by Year/../../Tools/PlotKit/Base.js" type="text/javascript"></script> The links are absolute and they are to the right place (There is a CSS link as well that uses the same method and it works fine). I've been using the following, which finds images and CSS just fine but for some reason won't run the .js. [webView loadRequest:requestObj]; I've tried changing the encoding of the files. I had a problem getting the CSS to work until the file was in unicode, but so far no luck. All the Script files are bundled with my project etc. Thanks in advance!

    Read the article

  • start function from another tab in UIWebView

    - by Marjan
    Hello, I have app which have two views implemented in Tabbar, one of them is UIWebView which shows some random html and second is mapView (route-me map), I have function in MapViewController.m which do sth stuff when is clicked on marker label - (void) tapOnLabelForMarker: (RMMarker*) marker onMap: (RMMapView*) map { NSLog(@"taponlabelformarker clicked"); self.tabBarController.selectedIndex=0; WebViewController *web = [[WebViewController alloc] init]; [web dajdasepije]; } and that function should call function which show html in uiwebview tab -(void)dajdasepije { NSLog(@" pokreni me njezno"); [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]]; } Problem is that UIWebView never show google page that I asked for it, NSLog prints out at terminal messages that function was called but nothing else happens. Please help, Thanks in advance. Marjan

    Read the article

  • Disable link in UIWebView in appearance and function

    - by Peter
    Hello, I wish to disable the href links on a UIWebView. First, I want the look of the link to change so the user doesn't think it is clickable. Second, I want the actual link to not be able to be tapped. I do not want to try webView:shouldStartLoadWithRequest:navigationType: since that not change the appearance of my links. I found this answer: Disabling visible links in UIWebView But the above hasn't worked for me. This is my code: NSString* s=[[NSString alloc] initWithFormat:@"for (a in document.getElementsByTagName(\"a\")) {a.href = \"\";}"]; [myWebView stringByEvaluatingJavaScriptFromString:s]; I've been working on this for hours, any suggestions are appreciated! Thanks!

    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 load remote html page with local images and javascript files

    - by BlueNile
    Im creating application that will display remote page on the UIWebView using local images and javascript/css files for faster loading. I want to avoid using cache because for this to work it must first load all the content. I was searching online for possible solution. Here is what I have: NSURLRequest *urlrequest = [ [NSURLRequest alloc] initWithURL: [NSURL URLWithString:urlString] ]; NSData *returnData = [ NSURLConnection sendSynchronousRequest:urlrequest returningResponse: nil error: nil ]; NSString *HTMLData = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; resourcePath = [resourcePath stringByReplacingOccurrencesOfString:@"/" withString:@"//"]; resourcePath = [resourcePath stringByReplacingOccurrencesOfString:@" " withString:@"%20"]; [webView loadHTMLString:HTMLData baseURL: [NSURL URLWithString: [NSString stringWithFormat:@"file:/%@//",resourcePath] ]]; urlString is defined and I moved files to the app bundle. Code works as I can see the remote page but no images nor javascript files are present.

    Read the article

  • How to authorize my app with Facebook

    - by xximjasonxx
    I know I have seen apps that log me in using Facebook but never present me with an authorization screen. I can not, for the life of me, figure out how to do this with Windows Phone 7. The best I have been able to get is using the Facebook for C# SDK to get the authorization screen in a WebView. This looks hideous and the page does not even appear to be mobile ready. I have searched high and low for an answer and have found nothing. Wondering if anyone can point me in the right direction to getting this to work? Thanks in advance

    Read the article

  • Oauth2 External Browser Request - App Launches, Credentials received, Browser Not Updated

    - by Michael Drozdowski
    I'm using an external browser request to authenticate myself with the SoundCloudAPI in OSX. My app launches, and has a button that opens an external browser window to authenticate against SoundCloud. When I click "connect" in the new window, I get a "External Protocol Request" that is consistent with my custom launch URI scheme. Clicking this loads the app, and it gets the correct credentials. The trouble is, the browser window never changes - it simply says that it's connecting forever. There is no "connection confirmed" alert coming from SoundCloud. I know I'm logged in because I can make the correct calls to the API to get things such as my username. Why isn't the browser confirming the connection or dismissing? The same thing happens if I load the authentication in an internal WebView in the app.

    Read the article

  • iPhone Gestures Adding 2 at once

    - by BahaiResearch.com
    Objective C answers are fine too. Currently I am using this code to add 2 gestures (left / right) to my WebView. Works fine. Can I combine this into less code though to indicate that both gestures go to the same action? //LEFT UISwipeGestureRecognizer sgr = new UISwipeGestureRecognizer (); sgr.AddTarget (this, MainViewController.MySelector); sgr.Direction = UISwipeGestureRecognizerDirection.Left; sgr.Delegate = new SwipeRecognizerDelegate (); this.View.AddGestureRecognizer (sgr); //RIGHT UISwipeGestureRecognizer sgrRight = new UISwipeGestureRecognizer (); sgrRight.AddTarget (this, MainViewController.MySelector); sgrRight.Direction = UISwipeGestureRecognizerDirection.Right; sgrRight.Delegate = new SwipeRecognizerDelegate (); this.View.AddGestureRecognizer (sgrRight);

    Read the article

  • Documents/Images display fine in Simulator, but not on my device

    - by Phamer
    Hello. My application is running fine on the simulator, but not on the device. Basically, any documents from the web (PDF, Word, M4P videos) are working great on the simulator (and can be accessed from Safari on the iPhone). However, running on the iPhone, they don't display anything. Here's some sample code: // Set up the URL documentViewController.documentUrl = [NSURL URLWithString:[NSString stringWithFormat:mobileContentUrl]]; // mobileContentUrl is something like: http://www.myserver.com/pathitem/Video.mp4" and can be accessed from Safari [self.navigationController pushViewController:documentViewController animated:YES]; Within documentViewController I have: - (void)viewDidLoad { [super viewDidLoad]; [webView loadRequest:[NSURLRequest requestWithURL:documentUrl]]; } As I said, works like a charm in the Simulator...What could possibly causing this NOT to work on iPhone? How do I debug the issue???

    Read the article

  • how to view all images in android's built- in gallery from a php page

    - by ramz
    Hi, I am developing an application to display all the images in android's built-in gallery in to a php page. I posted the uri(content://media/extrenal/images/media) of the gallery images to the php page. I was not able to recreate images by using webView function loadUrl(). Should i need to upload the whole gallery to another directory and display the images? Or passing the bitmap itself will do? Please suggest me an idea to solve the problem.

    Read the article

  • Is it possible to authenticate user manually with oauth2

    - by iixi
    I want to authenticate a user with oauth2 to access google drive. I can get the access token required when using AccountManager to retrieve an account and then get the token with: mgr.blockingGetAuthToken(account, ApiConst.DRIVE_AUTH_SCOPE, true); But I want the user to be able to authenticate by providing username and password instead of using the account added to the phone. Is this possible? EDIT So I have tried to implement the authorization in a WebView. I followed this example. I have extracted the code request parameter but the code used to retrieve the access token seems to be deprecated and not compatible with the packages used by Google Drive SDK. This is the code used to retrieve the access token in the example: AccessTokenResponse accessTokenResponse = new GoogleAuthorizationCodeGrant(new NetHttpTransport(), new JacksonFactory(), OAuth2ClientCredentials.CLIENT_ID, OAuth2ClientCredentials.CLIENT_SECRET, code, OAuth2ClientCredentials.REDIRECT_URI).execute(); Can this be done in some other way or should I just give up?

    Read the article

  • xcode - EXEC_BAD_ACCESS when concatenting a large string.

    - by Frames1984
    I'm getting a EXEC_BAD_ACCESS when concatenting a large string. I've read from a feed and to create my webview i build up my string like: NSString *pageData = @"<h1>header</h1>"; pageData = [pageData stringByAppendingFormat@"<p>"]; pageData = [pageData stringByAppendingFormat@"self.bodyText"]; pageData = [pageData stringByAppendingFormat@"</p>"]; etc problem i've got is self.bodytext is 21,089 charachers with spaces when I do a count on word. Is there a better method for doing this? Thank

    Read the article

  • JavaFX, Google Maps, and NetBeans Platform

    - by Geertjan
    Thanks to a great new article by Rob Terpilowski, and other work and research he describes in that article, it's now trivial to introduce a map component to a NetBeans Platform application. Making use of the GMapsFX library, as described in Rob's article, which provides a JavaFX API for Google Maps, you can very quickly knock this application together. Click to enlarge the image. Here's all the code (from Rob's article): @TopComponent.Description( preferredID = "MapTopComponent", persistenceType = TopComponent.PERSISTENCE_ALWAYS ) @TopComponent.Registration(mode = "editor", openAtStartup = true) @ActionID(category = "Window", id = "org.map.MapTopComponent") @ActionReference(path = "Menu/Window" /*, position = 333 */) @TopComponent.OpenActionRegistration( displayName = "#CTL_MapWindowAction", preferredID = "MapTopComponent" ) @NbBundle.Messages({ "CTL_MapWindowAction=Map", "CTL_MapTopComponent=Map Window", "HINT_MapTopComponent=This is a Map window" }) public class MapWindow extends TopComponent implements MapComponentInitializedListener { protected GoogleMapView mapComponent; protected GoogleMap map; private static final double latitude = 52.3667; private static final double longitude = 4.9000; public MapWindow() { setName(Bundle.CTL_MapTopComponent()); setToolTipText(Bundle.HINT_MapTopComponent()); setLayout(new BorderLayout()); JFXPanel panel = new JFXPanel(); Platform.setImplicitExit(false); Platform.runLater(() -> { mapComponent = new GoogleMapView(); mapComponent.addMapInializedListener(this); BorderPane root = new BorderPane(mapComponent); Scene scene = new Scene(root); panel.setScene(scene); }); add(panel, BorderLayout.CENTER); } @Override public void mapInitialized() { //Once the map has been loaded by the Webview, initialize the map details. LatLong center = new LatLong(latitude, longitude); MapOptions options = new MapOptions(); options.center(center) .mapMarker(true) .zoom(9) .overviewMapControl(false) .panControl(false) .rotateControl(false) .scaleControl(false) .streetViewControl(false) .zoomControl(false) .mapType(MapTypeIdEnum.ROADMAP); map = mapComponent.createMap(options); //Add a couple of markers to the map. MarkerOptions markerOptions = new MarkerOptions(); LatLong markerLatLong = new LatLong(latitude, longitude); markerOptions.position(markerLatLong) .title("My new Marker") .animation(Animation.DROP) .visible(true); Marker myMarker = new Marker(markerOptions); MarkerOptions markerOptions2 = new MarkerOptions(); LatLong markerLatLong2 = new LatLong(latitude, longitude); markerOptions2.position(markerLatLong2) .title("My new Marker") .visible(true); Marker myMarker2 = new Marker(markerOptions2); map.addMarker(myMarker); map.addMarker(myMarker2); //Add an info window to the Map. InfoWindowOptions infoOptions = new InfoWindowOptions(); infoOptions.content("<h2>Center of the Universe</h2>") .position(center); InfoWindow window = new InfoWindow(infoOptions); window.open(map, myMarker); } } Awesome work Rob, will be useful for many developers out there.

    Read the article

  • security policy error iphone ipod touch issue

    - by Joey
    I'm getting an "Error from Debugger: Error launching remote program: security policy error" when I try to run my app on my ipod touch. The provisions look in order, and the app builds to my iphone 3gs just fine. The app used to build just fine to my ipod touch, so I'm flustered what could have changed and wondering if anyone has any thoughts on what might be causing this issue. The build logs are below. Mon Mar 15 14:25:54 unknown com.apple.debugserver-43[449] : Connecting to com.apple.debugserver service... Mon Mar 15 14:25:55 unknown SpringBoard[24] : Unable to launch com.yourcompany.Unearthed because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. Mon Mar 15 14:25:55 unknown com.apple.debugserver-43[449] : error: unable to launch the application with CFBundleIdentifier 'com.yourcompany.Unearthed' sbs_error = 9 Mon Mar 15 14:25:55 unknown com.apple.debugserver-43[449] : 1 [01c1/0903]: RNBRunLoopLaunchInferior DNBProcessLaunch() returned error: '' Mon Mar 15 14:25:55 unknown com.apple.debugserver-43[449] : error: failed to launch process (null): security policy error Mon Mar 15 14:26:03 unknown MobileSafari[72] : void SendDelegateMessage(NSInvocation*): delegate (webView:decidePolicyForNavigationAction:request:frame:decisionListener:) failed to return after waiting 10 seconds. main run loop mode: UITrackingRunLoopMode

    Read the article

  • Android/Java -- Post simple text to Facebook wall?

    - by borg17of20
    Hello all, I'm trying to integrate posting to one's wall from within my app. I already have an area where the user can save his/her username and password (encrypted). I would like my program to recall the saved username and password, pass that to Facebook for authentication, and then allow the app to post simple text (maybe a link too) to the user's wall. That said, I've read everything on the developer pages at Facebook (the api looks completely foreign to me... I've never don't any type of web app development before... just desktop apps), and experimented with the Java libraries here: http://wiki.developers.facebook.com/index.php/User:Java but to be honest, I don't understand any of the various implementations. Some claim to be simple to use, but apparently they are all way above my head. I've even tried messing with the official Facebook Android SDK, but that uses a webview interface, and I can't pass in the username and password for easy authentication. Plus, I'm still clueless as to how to post to the wall even after correct authentication. Please help. Thanks. Oh, btw I already have a Facebook API key and Application ID.

    Read the article

  • UIWebView in custom UITableViewCell

    - by mlecho
    i am not sure if this is a good route to go,...i have some data i receive from the web which in turn, populates a table view. The problem is, the text is html (p tags, etc). My first thought was to create a uiwebview in the cell, and populate with loadHTMLString. Fact is , it KINDA works. But, i then the cell no longer was the recipient of touches. SO, before we get too deep in code, is there a better way to populate the cells, than using a UIWebView. It feels like a hack, and i fear even if it works, apple would turn it away. //from my custom UITableViewCell class: - (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier { if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) { [self setFrame:frame]; webcell = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,frame.size.width-20,frame.size.height)]; [self.contentView addSubview:webcell]; //bloack the webview from touches UIView *cover = [[UIView alloc] initWithFrame:webcell.frame]; [self.contentView addSubview:cover]; [cover release]; } return self; } -(void)setLabelData:(FeedItem *)feedItem { link = feedItem.link; NSMutableString *htmlstring = [NSMutableString string]; [htmlstring appendString:@"<html><head><link rel='stylesheet' href='style.css'/></head><body>"]; [htmlstring appendFormat:@"<p>%@</p>",feedItem.title]; [htmlstring appendFormat:@"<p>%@</p>",feedItem.description]; [htmlstring appendString:@"</body></html>"]; [webcell loadHTMLString:htmlstring baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]bundlePath]]]; } thanks

    Read the article

  • Tracking iPhone on Yahoo Web Analytics using ASIHTTPRequest

    - by Mads Mobæk
    I'm trying to track an event in my app using Yahoo Web Analytics. The code I am using looks like ASIHTTPRequest *yahooTrack = [ASIHTTPRequest requestWithURL: [NSURL URLWithString:@"http://s.analytics.yahoo.com/p.pl?a=xxxxxxxxxxxxx&js=no&b=yyyyyyyyyyyy&cf6=zzzzzzzzzzz"]]; yahooTrack.didFinishSelector = @selector(statisticsFinished:); yahooTrack.delegate = self; [yahooTrack startAsynchronous]; Then the statisticsFinished looks like: NSLog(@"Cookies: %@", request.requestCookies); NSLog(@"Redircount: %d", [request redirectCount]); NSLog(@"Responsecode %d %@\nMsg: %@", request.responseStatusCode, request.responseStatusMessage, [request responseString]); And all the information I get back looks correct. Cookies are set, redirectcount is 1 the first time (as it redirects to s.analytics.yahoo.com/itr.pl?.... a normal browser does). Then the redirectcount is 0 for subsequent request until the app is restarted and session cleared. The responseString returns GIF89a. Even if the data looks correct, Yahoo still won't track. As soon as I call the tracking url directly in my browser it works as expected. I realize Flurry is a better option, but I'm forced to use Yahoo in this case. Also, using a UIWebView probably would work, but I'm against putting in a webview just for tracking purposes. Is there any difference in how ASIHTTPRequest and Safari would handle a call to a simple URL as this? Or do you see anything else that could explain why the tracking isn't working?

    Read the article

< Previous Page | 16 17 18 19 20 21 22  | Next Page >