From 8b617cdf9a669f4b88c1432ec3695e02ee43e38c Mon Sep 17 00:00:00 2001 From: Daniel Tartaglia Date: Thu, 18 Oct 2018 12:01:36 -0400 Subject: [PATCH] Add an `initWithCoder:` This way FSInteractiveMapView can be contained in a storyboard/xib file. --- .../FSInteractiveMap/FSInteractiveMapView.m | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/FSInteractiveMap/FSInteractiveMap/FSInteractiveMapView.m b/FSInteractiveMap/FSInteractiveMap/FSInteractiveMapView.m index fc2db0e..eaeea5f 100644 --- a/FSInteractiveMap/FSInteractiveMap/FSInteractiveMapView.m +++ b/FSInteractiveMap/FSInteractiveMap/FSInteractiveMapView.m @@ -30,6 +30,17 @@ - (id)initWithFrame:(CGRect)frame return self; } +- (id)initWithCoder:(NSCoder*)aDecoder +{ + self = [super initWithCoder:aDecoder]; + if(self) { + _scaledPaths = [NSMutableArray array]; + [self setDefaultParameters]; + } + + return self; +} + - (void)setDefaultParameters { self.fillColor = [UIColor colorWithWhite:0.85 alpha:1];