Custom info window for GMSMarker utilising UIWebView - ios

I am using the Google Map iOS SDK for a project and have run into a problem whilst trying to implement a custom info window for a GMSMarker object. I have followed the Google video tutorial but instead of using A UILabel and UIImage, I am placing a UIWebView in the UIView as this will display HTML formatted text. However, when I run the code the UIWebView is always blank. If I replace with A UILabel the info window works. Has anyone else tried to use a UIWebView like this with the iOS SDK? I am wondering if it's related to the UIWebView taking too long to render?

last I checked the info window had to be a static uiview as it is rendered to an image. (same as markers are not UIViews but only static images)
the way I do it:
return an empty transparent view to the GMSMapView and THEN:
roll your own that you add as a subview yourself!
This link show what I described:
https://github.com/ryanmaxwell/GoogleMapsCalloutView

Related

Callout for annotation view is cut-off in macOS(Mac-catalyst) app

I am having an issue with annotation view which is shown on Map view.
The call out view on clicking on pin does not showing full address text.
Reference Image
This is working in iOS but not working in Mac catalyst app.
Please help if anyone have any idea.
Thanks all.
You are using MKPinAnnotationView which is deprecated.
Please switch to MKMarkerAnnotationView.
The new class has many advantages.

how to embed YouTube video in iOS UITableViewCell

I would like to embed YouTube videos in UITableViewCells of my iOS app.
first of all I config the youtube-ios-player package in my Podfile using this command:
pod "youtube-ios-player-helper"
then I create a custom cell and add a YTPlayerView on each cell.
when I ran my app I found that the tableview stuck.So is there a better way to embed YouTube videos to my app.
thanks
Well after some research, I found a way that can make the tableview run fluently.
Try this url we will get a image:
https://img.youtube.com/vi/\(videoId)/0.jpg
I create a UIImageView on each cell.
When the user clicks on the cell, I call the playVideo() method.

Can I use the default UIBarButton icons provided by Apple in other assets of my app?

Like in UIButton or a UIImageView etc..
If so how do I do that using the StoryBoard or in a Xib
I am able to use the default icons inside UIBarButton items but cannot look them up in normal buttons . A solution using Storyboard would be really nice
In order to use them you need to extract them using a handy little app called (fittingly enough) iOS Artwork Extractor. I use it all the time when I want to mimic iOS system behaviours.
Download the Xcode project at:
https://github.com/0xced/iOS-Artwork-Extractor
Or another way:
The Other.artwork file is in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/ (you need the SDK).
Use the "iPhoneShop-1.3.jar" program -- available currently here to extract all of the images into a directory.
java -jar iPhoneShop-1.3.jar ARTWORK Other.artwork EXPORT Other
No you cannot use UIBarButtonItem on other as subview like UIButton. UIBarButtonItem can only over UINavigationBar.

Is it possible to create marker with animated icon?

I'm using Google Maps SDK for iOS and I would like to display a marker on my map. I've found out that the class GMSMarker is involved but it only accepts UIImage icon.
I would like the icon to be UIView or CALayer such that its contents could be animated. Is this possible?
I know that if needed, both of the aforementioned UI objects can be rendered into UIImage. However, that's utterly unefficient and ugly code. I would be really happy if there was other way.
Thanks in advance,
Pete.
No, the marker (or overlay) can only display UIImage objects, although they do support animated UIImages (see the AnimatedCurrentLocationViewController in the demo project).

How to avoid hours being marked as link to calendar?

I am using a UIWebView to fetch a webpage that contains the log of musics previous played at my radio station. The original file is here. It appears on the app as follows: Image
How can I force it to stay with the hours in white and do not create a link to the calendar?
Thanks in advance
Since you're loading it in a UIWebView you can turn off data detection for the UIWebView:
UIWebView *webView = // Set this up as you wish
webView.dataDetectorTypes = UIDataDetectorTypeNone;
This is all described in the UIWebView documentation

Resources