-
Notifications
You must be signed in to change notification settings - Fork 79
Makes Use of Annotation, Stroke, and Tint Colors #85
Conversation
…ntColor This would only happen after the alert controller would appear
for subview in subviews { | ||
subview.tintColor = tintColor | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a problem in which annotations would revert back to the default tintColor
after presenting an alert controller, exiting the editor, then returning to the editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative if we don't want to do this would be to not use tintColor
for the fill color of the annotations, and expose another property alongside Annotation
's strokeColor
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the AnnotationView
subclasses should be getting tintColorDidChange
also and potentially handling it each in their own class, so the parent doesn't have to workaround it. Are they not doing that currently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For posterity: tintColorDidChange()
does get called at which point tintColor
is the correct color, but tintColor
is the wrong color (default blue) the next time drawRect(_:)
is called.
To test, change the default |
override func tintColorDidChange() { | ||
super.tintColorDidChange() | ||
|
||
for subview in subviews { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could now use a comment explaining why it's here.
These customizable properties were not in use. Everything within the editor and annotations were either hardcoded, or in the case of
tintColor
the iOS default.