How to change Apple Map (MKMapView) background colors? - ios

I've Required an iOS application with a black theme, and would really like to make the displayed Apple Map also in black colors.
I see nothing in the native documentation that talks about changing look for MKMapView.
I've Googled the topic and tried to change MKOverlayView.But, I couldn't find anything.
Is this even possible? Can I change the background colors of the Apple Map.
Thank you.

You can customize map using MapBoxKit
https://www.mapbox.com/ios-sdk/api/3.6.4/runtime-styling.html
In Mapkit you can only set dark mode as hybrid as follow:
in viewDidLoad write below code:-
mapView.mapType = .Hybrid
Need to add Privacy - Photo Library Usage Description in info.plist
also you can set from IB as above:-

Related

Here Map SDK IOS (Premium) tap on the marker

Good afternoon, who once worked with heremap sdk premium for ios. How do I make it possible to click on the NMAMapMarker? What they have written in the documentation does not describe it, but maybe I'm wrong.
there are different option available for NMAMapMarker to use.
This represents a marker used to display an icon on a geographical position on a map. The map handles proper placement of icons on the screen as well as panning and rotation.
+mapMarkerWithGeoCoordinates:
+mapMarkerWithGeoCoordinates:icon:
+mapMarkerWithGeoCoordinates:image:
coordinates
icon
draggable
draggingOffsetEnabled
anchorOffset
-initWithGeoCoordinates:
-initWithGeoCoordinates:icon:
-initWithGeoCoordinates:image:
-setAnchorOffsetUsingLayoutPosition:
-setSize:forZoomLevel:
-setSize:forZoomRange:
-resetIconSize
Check for more details : https://developer.here.com/documentation/ios-premium/3.18/api_reference_jazzy/Classes/NMAMapMarker.html#%2Fc:objc(cs)NMAMapMarker(im)initWithGeoCoordinates.
Please revert with your code implementation in case of any further concern.

Change iOS System Keyboard Background Image and Buttons Image

Rather than creating a custom keyboard...how can I change the ios keyboard background image and get reference of the keyboard button or just the keyboard view programatically?
I do not want to replicate the whole ios keyboard, just tweak the keyboard here and there.
Solution Update:
You cannot update only the background or the buttons of the iOS System Keyboard! This is dues to the reason that Apple has limited the access to the Keyboard API. The most you can do is change the keyboard background color i.e. dark or light.
If you need to change the background to an image like me, you need to extend the ios keyboard i.e. make your own custom keyboard!
Please check below for accepted answer!
Hope this helps!
You can do something like this,
myTextField.keyboardType = UIKeyboardTypeDecimalPad; // many other options
myTextField.keyboardAppearance = UIKeyboardAppearanceDark; //many other options
If you want totally customize keyboard then refer this tutorial.
Hope this will help :)
For dark background you can use
mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;
For more customisation follow this link:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextInputTraits_Protocol/index.html

WatchKit UIPageControl Dot Colour

When I was watching one of the videos from Apple about the Apple Watch and its features I noticed that the page indicator dot colours change depending on the page presented.
They've also got images of the coloured dots within the Apple Watch Human Interface Guidelines App Anatomy section. Note the coloured title text as well.
Normally in WatchKit I would use the following snippet of code to do this:
let features = ["First", "Second", "Third"]
let controllers = [String](count: features.count, repeatedValue: "FeatureInterfaceController")
self.presentControllerWithNames(controllers, contexts: features)
Unfortunately as far as I know there isn't a way to access the currentPageIndicatorTintColor and pageIndicatorTintColor as you normally would as part of UIKit here (scroll down to Tint Color).
I wonder if Apple simply just added those colours for the video or whether they're actually going to be available as part of WatchKit in the future?
Perhaps I'm wrong and there is a way to change these dot colours.
As written by an Apple Engineer in the Dev Forums, it's not possible to customize the color of the page control at this time.
Source: https://devforums.apple.com/message/1100695#1100695

How to remove an arrow from Google Maps geolocation marker (iOS)?

How do you remove an arrow from Google Maps geolocation marker (iOS)?
This is an arrow I'm talking about
If you really want to remove that arrow everywhere in your app from Google Maps SDK, it might be easiest to modify asset in GoogleMaps.framework.
Just navigate (cd) to GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ and notice the following files:
GMSSprites-0-1x.png
GMSSprites-0-2x.png
GMSSprites-0-3x.png
If you open these files, you can notice the arrow is there. So just edit directly in the asset by replacing arrow by nothing (transparent pixels).
Note: I haven't test it myself and this is not tested solution, but I believe it should work.
Disclaimer: I'm not sure, but I think this modification might violate Terms & Conditions for using the SDK. I don't get any responsibility for such modification, it's your call...
There is no way to do this with current version of the SDK (1.9.1), and actually there is an open issue with this request: Look here.
As a work around, you can hide the default button with:
_map.myLocationEnabled = NO;
Then create a custom GMSMarker
GMSMarker *pointMarker = [GMSMarker markerWithPosition:currentPosition];
pointMarker.icon = [UIImage imageNamed:#"YourImage"];
pointMarker.map = _map;
And change the position of it using a CLLocationManager, so it always show the current position. It's a bit tricky but is the only way, I could think, that you can achieve this. If you need a more complete example let me know.

Is there a way to check if "increase contrast" is enabled in the accessibility settings in iOS?

On iOS 7.0.3 turning on increased contrast mode removes the blur effects you'd normally see in the nav bar if you're using a bar tint color with an alpha less than 1.0, which makes the nav bar seem much more transparent than it is with the default settings.
Is there a way to programmatically check to see if this setting is enabled? While UIAccessibility has a ton of other functions like UIAccessibilityIsInvertColorsEnabled(), I can't find anything related to this setting specifically.
As of iOS 8 there is a way to check:
UIKIT_EXTERN BOOL UIAccessibilityDarkerSystemColorsEnabled() NS_AVAILABLE_IOS(8_0);
as of modern iOS:
UIAccessibility.isDarkerSystemColorsEnabled
Apparently there's no public API for checking whether that option is on.
According to the UIKit Function Reference, the only checks you can perform are the following
UIAccessibilityPostNotification
UIAccessibilityIsVoiceOverRunning
UIAccessibilityIsClosedCaptioningEnabled
UIAccessibilityRequestGuidedAccessSession
UIAccessibilityIsGuidedAccessEnabled
UIAccessibilityIsInvertColorsEnabled
UIAccessibilityIsMonoAudioEnabled
UIAccessibilityZoomFocusChanged
UIAccessibilityRegisterGestureConflictWithZoom
UIAccessibilityConvertFrameToScreenCoordinates
UIAccessibilityConvertPathToScreenCoordinates
For iOS 13 and above we can use accessibilityContrast
Documentation
Use this trait to determine whether the user requested a high contrast
between foreground and background content. The user sets the contrast
level in the Accessibility area in Settings.
Apple doc link

Resources