I'd like to use WKWebView instead of a UIWebView to display data on iOS. However, it seems that loadData:MIMEType:textEncodingName:baseURL: was removed in WKWebView.
Is there any way to mimic this functionality in WKWEbView?
Thanks!
You could convert your NSData to NSString and use loadHTMLString:baseURL: (API Docs).
However, that method has issues with file-system base URLs in the latest beta: WKWebView not working in iOS 8 beta 4.
As of iOS 9.0 and onwards WKWebView now has the same method:
- loadData:MIMEType:characterEncodingName:baseURL:
That said, I'm currently having issues with certain file types (MS Word) that worked in UIWebView but not in WKWebView.
Related
I understand that it is currently prohibited to use UIWebView for App Store apps. However, I've seen from jcesarmobile's answer that it is possible to still use it. Based on this method, is there a way to also use UIWebViewDelegate or another way to detect if the UIWebView has loaded or is still loading?
I am trying to implement geofencing through xamarin.forms. First i have started my work in iOS then i found a library i.e. CoreLocation, in this i am using CLCircularRegion class for making virtual boundary.
CLCircularRegion region = new CLCircularRegion(new CLLocationCoordinate2D(+28.5003615,+77.0718658), 1.0, "MDS");
But i am not sure about the central points(latitude,longitude) which is passed in CLLocationCoordinate2D. How can i get exact latitude and longitude of my place and how i can implement geofencing in correct manner in iOS through xamarin.forms.
How can I get exact latitude and longitude of my place
Once you set the Geofencing the device start to track you location to see if you entered the defined fence. You can also use the MKMapView to identify and follow the user.
I have put together a small sample project couple of weeks ago to demonstrate the Geofencing in iOS
how i can implement geofencing in correct manner in iOS through xamarin.forms.
The Geofencing is platform-specific code that you cannot really abstract out in shared project. Instead, you can use DependencyService to access the method/events from iOS project to Shared project
Is there a way to achieve this kind of style with Google maps?
No.
Google maps for Android and iOS use v2. Custom styling is only available on v3. This feature request has been open for nearly two years so it's unlikely to be implemented any time soon.
Your only option is to use javascript styles and wrap it up as a web-view or look at another map provider like MapBox
Google launched styled maps for iOS and Android along with a new styling wizard that allows you to apply the same style across all different platforms, including Maps JavaScript API and Static Maps. There are even some new code and style samples available for iOS.
Let´s see, I am developing an app which uses some ModalViewCotrollers.
When I show any of these modals, everything is going OK, I can work with it and interact with his content. The problem comes when I try to do:
[self dismissModalViewControllerAnimated:YES];
This problem, only happens in lower version than iOS 5.0
The modals are called from my DetailViewController (in Master-Detail app).
Any suggestion??
Thanks everybody in advanced!!!
Have you tried if you are dismissing from the correct view controller??
Like this:
[self.parentViewController.parentViewController dismissModalViewControllerAnimated:YES];
Anyway, I found a couple of good links which could be helpful for you:
Modal view controller won't dismiss itself
dismissModalViewControllerAnimated: (and dismissViewControllerAnimated) crashing in iOS 5
Hello I have this webiste www.liiklusinfo.ee and it's basically designed to work on web browsers, but is it possible to see that map on an Android mobile-phone? I can see that it is possible, because http://kraater.eu/en/map shows up on my android phone, but why isn't my website showing up? When I open the page, it states that I must get a new API code, but I have all the right API keys..
It's definitely due to the fact that you are using Maps API v2 instead of v3.
"http://maps.google.com/maps?file=api&v=2&hl=en&sensor=false&key=ABQIAAAAzrzbFLxHQWFbTQr9PqQ_HhRwAQ6CP1ccuJFaeFcXqlGX2NtZ2xQSe3YINEpjxiDi-m_GSubdYtbMEg">
V2 is causing some issues which is preventing v3 from loading. You may be able to find the route of those problems, but it would just be easier to switch to v3.
I would recommend reading this guide:
http://blogs.missouristate.edu/web/2010/05/12/google-maps-api-v3-developing-for-mobile-devices/
I'd suggest upgrading to the version 3 api, the tag line is V3: The Solution for Maps Applications for both the Desktop and Mobile Devices after all.
This should solve your problem. Moreover, i can see the map on the opera mini browser on my android just not the other.