Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Makes Use of Annotation, Stroke, and Tint Colors #85

Merged
merged 5 commits into from
Jun 3, 2016
Merged

Conversation

mliberatore
Copy link
Contributor

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.

img_5570 img_5571
img_5572

for subview in subviews {
subview.tintColor = tintColor
}
}
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

@mliberatore mliberatore Jun 3, 2016

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.

@mliberatore
Copy link
Contributor Author

To test, change the default tintColor, annotationStrokeColor and annotationFillColor parameter values in InterfaceCustomization.Appearance.init().

override func tintColorDidChange() {
super.tintColorDidChange()

for subview in subviews {
Copy link
Member

@bcapps bcapps Jun 3, 2016

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.

@bcapps bcapps merged commit bb1c293 into master Jun 3, 2016
@bcapps bcapps deleted the uses-colors branch June 3, 2016 19:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants