I am trying to convert UIWebview into UIImage in WebviewDidFinishLoading method.But it doest not rendering the complete html.
How to know UIwebview is fully loaded or rendering is completed in iOS without using private API's?
Related
I'm following the instructions for adding stylekit images to storyboards by adding an object, setting it's class to stylekit and then right click dragging to the UIImage from the stylekit object - however I'm not seeing the images show up in UIImageView preview in the storyboard. The image is there when I run the code however.
Is there a different series of steps I need to take? I'm using ios9 xcode 7.
Interface Builder doesn’t allow previewing this kind of connections. To see the image in IB, you will need to subclass the view, mark it as #IBDesignable and override drawRect method, where you call the StyleKit drawing method.
I had found this post on the site for adding UIImage to the MKMapView but this is in the objective-c. can any body help how can we use it on the monotouch by c# ?
https://stackoverflow.com/a/6554418
I recommand you to view this screencast from Xamarin about "Developing iOS Map Applications with C#".
It doesn't cover the custom MKOverlayView drawing part because it's exactly as creating a custom view and overriding it's drawing routine.
But it does explain you how and why you have to endup here..
Basically, you have to
create a custom MKImageOverlay object (subclassing MKOverlay)
create a custom MKImageOverlayView object (subclassing MKOverlayView) that will handle the actual image drawing methods (like any view drawing overriding using CoreGraphics)
add your custom MKImageOverlay to the map with MKMapView.addOverlay() method
provide a MKMapViewDelegate to the map that will handle your custom MKImageOverlay by overriding GetViewForOverlay and returning your custom MKImageOverlayView
You could look at this SO post here too : MonoTouch Mapkit image overlay
Cheers
I'm using the NativeControls plugin to create a tabbar - http://d.pr/vBJZ
Apparently, on first load, the tabbar has the onSelect event attached to them and i can refresh the webview just fine by doing window.location="http://someremotedomain.com".
But once the webview refreshed with the new external page - it seems the tabbar loses its onSelect event.
I suppose my real question is - why does the tabbar buttons loses its onSelect Event when the webbview starts to show a different (remote/external)page?
Does that mean that i have to re initialize the NativeControls on every new page? that isn't possible because the page im showing is coming from an external source, which doesn't include the phonegaps js related files.
My 2nd question - probably would help me dilemma, is there any way to grab the UIWebView control?
okay nevermind i figured out:
the javascript callback function doesn't exist anymore on the next page
yes you can - but i don't know in the js file but in the plugin/obj-c you can access the webview
I am creating an iOS app that displays a web view. How can I show an animated busy icon that shows a webpage is still loading. The icon should of course disappear when the webpage is fully loaded. An example code would be nice to have.Thanks
OK, I figured out my own problem. For those of you who might want to know how to do this... UIWebView has a protocol called UIWebViewDelegate Protocol naming some methods that can be implemented optionally. To show an animated icon in the status bar while a web page is loading, simply implement the webViewDidStartLoad method. Something like this...
- (void)webViewDidStartLoad:(UIWebView *)webView {
// starting the load, show the activity indicator in the status bar
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}
(Edited)
I'm using UIWebView and I'm expeting shouldStartLoadRequest: - didStart.. - didFinish.. delegate method routine.
But after shouldStartLoadRequest: (that is working right), my webview didn't jump into didStart/didFinish.
My url request is .do (I searched, that would be reference URL with Ajax)
The problem is, I can't toggle goBack/goForward buttons with UIWebView delegate.
I often implement in didStart/didFinish with networkIndicator, but at this time, I can't.
How do I implement to toggle goBack/goForward enabled?
(Of course, I set the delegate so request)