├── .gitignore ├── ASPolylineRenderer.h ├── ASPolylineRenderer.m ├── ASPolylineView-macOS ├── ASPolylineView-macOS.h └── Info.plist ├── ASPolylineView.h ├── ASPolylineView.m ├── ASPolylineView.podspec ├── ASPolylineView.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ ├── ASPolylineView-iOS.xcscheme │ └── ASPolylineView-macOS.xcscheme ├── ASPolylineView ├── ASPolylineView-iOS.h └── Info.plist ├── LICENSE.md ├── PolylineExample ├── PolylineExample.xcodeproj │ └── project.pbxproj └── PolylineExample │ ├── ASAppDelegate.h │ ├── ASAppDelegate.m │ ├── ASViewController.h │ ├── ASViewController.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── PolylineExample-Info.plist │ ├── PolylineExample-Prefix.pch │ ├── en.lproj │ ├── InfoPlist.strings │ └── MainStoryboard.storyboard │ └── main.m └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /ASPolylineRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASPolylineRenderer.h 3 | // 4 | // Created by Adrian Schoenig on 01/08/13. 5 | // 6 | // 7 | 8 | #import 9 | 10 | #if TARGET_OS_IPHONE 11 | #define ASColor UIColor 12 | #else 13 | #define ASColor NSColor 14 | #endif 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @interface ASPolylineRenderer : MKOverlayPathRenderer 19 | 20 | /* The color used for the wider border around the polyline. 21 | * Defaults to black. 22 | */ 23 | @property (nonatomic, strong) ASColor *borderColor; 24 | 25 | /* The color used as the backdrop if there's a dash pattern. 26 | * Defaults to white. 27 | */ 28 | @property (nonatomic, strong) ASColor *backgroundColor; 29 | 30 | 31 | /* The factor by which the border expands past the line. 32 | * 1.5 leads to a very thin line. 33 | * Defaults to 2.0. 34 | */ 35 | @property (nonatomic, assign) CGFloat borderMultiplier; 36 | 37 | - (id)initWithPolyline:(MKPolyline *)polyline; 38 | 39 | - (MKPolyline *)polyline; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /ASPolylineRenderer.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASPolylineRenderer.m 3 | // 4 | // Created by Adrian Schoenig on 01/08/13. 5 | // 6 | // 7 | 8 | #import "ASPolylineRenderer.h" 9 | 10 | @interface ASPolylineRenderer () { 11 | CGMutablePathRef _mutablePath; 12 | } 13 | 14 | @property (nonatomic, strong) MKPolyline *polyline; 15 | 16 | @end 17 | 18 | @implementation ASPolylineRenderer 19 | 20 | - (id)initWithPolyline:(MKPolyline *)polyline 21 | { 22 | self = [super initWithOverlay:polyline]; 23 | if (self) { 24 | self.polyline = polyline; 25 | _mutablePath = CGPathCreateMutable(); 26 | [self constructPath]; 27 | 28 | // defaults 29 | self.borderColor = [ASColor blackColor]; 30 | self.backgroundColor = [ASColor whiteColor]; 31 | self.borderMultiplier = 2.0; 32 | } 33 | return self; 34 | } 35 | 36 | - (void)dealloc 37 | { 38 | CGPathRelease(_mutablePath); 39 | _mutablePath = NULL; 40 | } 41 | 42 | - (void)drawMapRect:(MKMapRect)mapRect 43 | zoomScale:(MKZoomScale)zoomScale 44 | inContext:(CGContextRef)context 45 | { 46 | CGFloat baseWidth = self.lineWidth; 47 | CGFloat width = zoomScale < 0.01 ? baseWidth / 2 : baseWidth; 48 | 49 | // nice for debugging 50 | // CGContextSetRGBFillColor(context, (rand() % 255) / 255.0, 0, 0, 0.1); 51 | // CGContextFillRect(context, [self rectForMapRect:mapRect]); 52 | 53 | // draw the border. it's slightly wider than the specified line width. 54 | [self drawLine:self.borderColor.CGColor 55 | width:width * self.borderMultiplier 56 | allowDashes:NO 57 | forZoomScale:zoomScale 58 | inContext:context]; 59 | 60 | // a white background. 61 | if (self.backgroundColor) { 62 | [self drawLine:self.backgroundColor.CGColor 63 | width:width 64 | allowDashes:NO 65 | forZoomScale:zoomScale 66 | inContext:context]; 67 | } 68 | 69 | // draw the actual line. 70 | [self drawLine:self.strokeColor.CGColor 71 | width:width 72 | allowDashes:YES 73 | forZoomScale:zoomScale 74 | inContext:context]; 75 | 76 | } 77 | 78 | - (void)constructPath 79 | { 80 | // turn the polyline into a path 81 | BOOL pathIsEmpty = YES; 82 | 83 | for (int i = 0; i < self.polyline.pointCount; i++) { 84 | CGPoint point = [self pointForMapPoint:self.polyline.points[i]]; 85 | 86 | if (pathIsEmpty) { 87 | CGPathMoveToPoint(_mutablePath, nil, point.x, point.y); 88 | pathIsEmpty = NO; 89 | } else { 90 | CGPathAddLineToPoint(_mutablePath, nil, point.x, point.y); 91 | } 92 | } 93 | } 94 | 95 | #pragma mark - Private helpers 96 | 97 | - (void)drawLine:(CGColorRef)color 98 | width:(CGFloat)width 99 | allowDashes:(BOOL)allowDashes 100 | forZoomScale:(MKZoomScale)zoomScale 101 | inContext:(CGContextRef)context 102 | { 103 | CGContextAddPath(context, _mutablePath); 104 | 105 | // use the defaults which takes care of the dash pattern 106 | // and other things 107 | if (allowDashes) { 108 | [self applyStrokePropertiesToContext:context atZoomScale:zoomScale]; 109 | } else { 110 | // some setting we still want to apply 111 | CGContextSetLineCap(context, self.lineCap); 112 | CGContextSetLineJoin(context, self.lineJoin); 113 | CGContextSetMiterLimit(context, self.miterLimit); 114 | } 115 | 116 | // now set the colour and width 117 | CGContextSetStrokeColorWithColor(context, color); 118 | CGContextSetLineWidth(context, width / zoomScale); 119 | 120 | CGContextStrokePath(context); 121 | } 122 | 123 | @end 124 | -------------------------------------------------------------------------------- /ASPolylineView-macOS/ASPolylineView-macOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASPolylineView-macOS.h 3 | // ASPolylineView-macOS 4 | // 5 | // Created by Adrian Schoenig on 25/7/17. 6 | // Copyright © 2017 Adrian Schoenig. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ASPolylineView-macOS. 12 | FOUNDATION_EXPORT double ASPolylineView_macOSVersionNumber; 13 | 14 | //! Project version string for ASPolylineView-macOS. 15 | FOUNDATION_EXPORT const unsigned char ASPolylineView_macOSVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | 21 | -------------------------------------------------------------------------------- /ASPolylineView-macOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSHumanReadableCopyright 22 | Copyright © 2017 Adrian Schoenig. All rights reserved. 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ASPolylineView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASPolylineView.h 3 | // 4 | // Created by Adrian Schoenig on 21/02/13. 5 | // 6 | // 7 | 8 | #import 9 | #import 10 | 11 | #import "ASPolylineRenderer.h" // Not really needed, but addresses an issue with Carthage 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | NS_CLASS_DEPRECATED_IOS(2_0, 7_0, "Use ASPolylineRenderer instead") 16 | @interface ASPolylineView : MKOverlayPathView 17 | 18 | /* The color used for the wider border around the polyline. 19 | * Defaults to black. 20 | */ 21 | @property (nonatomic, strong) UIColor *borderColor; 22 | 23 | /* The color used as the backdrop if there's a dash pattern. 24 | * Defaults to white. 25 | */ 26 | @property (nonatomic, strong) UIColor *backgroundColor; 27 | 28 | 29 | /* The factor by which the border expands past the line. 30 | * 1.5 leads to a very thin line. 31 | * Defaults to 2.0. 32 | */ 33 | @property (nonatomic, assign) CGFloat borderMultiplier; 34 | 35 | - (id)initWithPolyline:(MKPolyline *)polyline; 36 | 37 | - (MKPolyline *)polyline; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | 43 | -------------------------------------------------------------------------------- /ASPolylineView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASPolylineView.m 3 | // 4 | // Created by Adrian Schoenig on 21/02/13. 5 | // 6 | // 7 | 8 | #import "ASPolylineView.h" 9 | 10 | @interface ASPolylineView () 11 | 12 | @property (nonatomic, strong) MKPolyline *polyline; 13 | 14 | @end 15 | 16 | @implementation ASPolylineView 17 | 18 | - (id)initWithPolyline:(MKPolyline *)polyline 19 | { 20 | self = [super initWithOverlay:polyline]; 21 | if (self) { 22 | self.polyline = polyline; 23 | 24 | // defaults 25 | self.borderColor = [UIColor blackColor]; 26 | self.backgroundColor = [UIColor whiteColor]; 27 | self.borderMultiplier = 2.0; 28 | } 29 | return self; 30 | } 31 | 32 | - (void)drawMapRect:(MKMapRect)mapRect 33 | zoomScale:(MKZoomScale)zoomScale 34 | inContext:(CGContextRef)context 35 | { 36 | CGFloat baseWidth = self.lineWidth; 37 | 38 | // draw the border. it's slightly wider than the specified line width. 39 | [self drawLine:self.borderColor.CGColor 40 | width:baseWidth * self.borderMultiplier 41 | allowDashes:NO 42 | forZoomScale:zoomScale 43 | inContext:context]; 44 | 45 | // a white background. 46 | [self drawLine:self.backgroundColor.CGColor 47 | width:baseWidth 48 | allowDashes:NO 49 | forZoomScale:zoomScale 50 | inContext:context]; 51 | 52 | // draw the actual line. 53 | [self drawLine:self.strokeColor.CGColor 54 | width:baseWidth 55 | allowDashes:YES 56 | forZoomScale:zoomScale 57 | inContext:context]; 58 | 59 | [super drawMapRect:mapRect zoomScale:zoomScale inContext:context]; 60 | } 61 | 62 | - (void)createPath 63 | { 64 | // turn the polyline into a path 65 | CGMutablePathRef path = CGPathCreateMutable(); 66 | BOOL pathIsEmpty = YES; 67 | 68 | for (int i = 0; i < self.polyline.pointCount; i++) { 69 | CGPoint point = [self pointForMapPoint:self.polyline.points[i]]; 70 | 71 | if (pathIsEmpty) { 72 | CGPathMoveToPoint(path, nil, point.x, point.y); 73 | pathIsEmpty = NO; 74 | } else { 75 | CGPathAddLineToPoint(path, nil, point.x, point.y); 76 | } 77 | } 78 | 79 | self.path = path; 80 | CGPathRelease(path); 81 | } 82 | 83 | #pragma mark - Private helpers 84 | 85 | - (void)drawLine:(CGColorRef)color 86 | width:(CGFloat)width 87 | allowDashes:(BOOL)allowDashes 88 | forZoomScale:(MKZoomScale)zoomScale 89 | inContext:(CGContextRef)context 90 | { 91 | 92 | CGContextAddPath(context, self.path); 93 | 94 | // use the defaults which takes care of the dash pattern 95 | // and other things 96 | if (allowDashes) { 97 | [self applyStrokePropertiesToContext:context atZoomScale:zoomScale]; 98 | } else { 99 | // some setting we still want to apply 100 | CGContextSetLineCap(context, self.lineCap); 101 | CGContextSetLineJoin(context, self.lineJoin); 102 | CGContextSetMiterLimit(context, self.miterLimit); 103 | } 104 | 105 | // now set the colour and width 106 | CGContextSetStrokeColorWithColor(context, color); 107 | CGContextSetLineWidth(context, width / zoomScale); 108 | 109 | CGContextStrokePath(context); 110 | } 111 | 112 | @end 113 | 114 | -------------------------------------------------------------------------------- /ASPolylineView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "ASPolylineView" 3 | s.version = "1.0.2" 4 | s.summary = "Drop-in replacement for MKPolylineRenderer and MKPolylineView with more customisation options." 5 | s.description = <<-DESC 6 | Currently it is simple and only includes drawing a differently coloured border around the line. See header files for options. 7 | DESC 8 | s.homepage = "https://github.com/nighthawk/ASPolylineView" 9 | s.license = 'FreeBSD' 10 | s.author = { "Adrian Schoenig" => "adrian.schoenig@gmail.com" } 11 | s.source = { :git => "https://github.com/nighthawk/ASPolylineView.git", :tag => "v#{s.version}" } 12 | s.framework = 'MapKit' 13 | s.requires_arc = true 14 | 15 | s.ios.deployment_target = '5.0' 16 | s.osx.deployment_target = '10.9' 17 | 18 | s.ios.source_files = '*.{h,m}' 19 | s.osx.source_files = 'ASPolylineRenderer.{h,m}' 20 | end 21 | -------------------------------------------------------------------------------- /ASPolylineView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3A06C5081F274AC4004DB662 /* ASPolylineView-iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A06C5061F274AC4004DB662 /* ASPolylineView-iOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 3A06C5201F274B2B004DB662 /* ASPolylineView-macOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A06C51E1F274B2B004DB662 /* ASPolylineView-macOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 3A06C52A1F274BDE004DB662 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A06C5291F274BDE004DB662 /* MapKit.framework */; }; 13 | 3A06C52C1F274BEB004DB662 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A06C52B1F274BEB004DB662 /* MapKit.framework */; }; 14 | 3A5F6C181F274E0A0058DC36 /* ASPolylineRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5F6C141F274E0A0058DC36 /* ASPolylineRenderer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | 3A5F6C191F274E0A0058DC36 /* ASPolylineRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5F6C141F274E0A0058DC36 /* ASPolylineRenderer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 3A5F6C1A1F274E0A0058DC36 /* ASPolylineRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5F6C151F274E0A0058DC36 /* ASPolylineRenderer.m */; }; 17 | 3A5F6C1B1F274E0A0058DC36 /* ASPolylineRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5F6C151F274E0A0058DC36 /* ASPolylineRenderer.m */; }; 18 | 3A5F6C1C1F274E0A0058DC36 /* ASPolylineView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5F6C161F274E0A0058DC36 /* ASPolylineView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19 | 3A5F6C1E1F274E0A0058DC36 /* ASPolylineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5F6C171F274E0A0058DC36 /* ASPolylineView.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 3A06C5031F274AC4004DB662 /* ASPolylineView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ASPolylineView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 3A06C5061F274AC4004DB662 /* ASPolylineView-iOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ASPolylineView-iOS.h"; sourceTree = ""; }; 25 | 3A06C5071F274AC4004DB662 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | 3A06C51C1F274B2B004DB662 /* ASPolylineView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ASPolylineView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 3A06C51E1F274B2B004DB662 /* ASPolylineView-macOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ASPolylineView-macOS.h"; sourceTree = ""; }; 28 | 3A06C51F1F274B2B004DB662 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | 3A06C5291F274BDE004DB662 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 30 | 3A06C52B1F274BEB004DB662 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/MapKit.framework; sourceTree = DEVELOPER_DIR; }; 31 | 3A5F6C141F274E0A0058DC36 /* ASPolylineRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASPolylineRenderer.h; sourceTree = SOURCE_ROOT; }; 32 | 3A5F6C151F274E0A0058DC36 /* ASPolylineRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASPolylineRenderer.m; sourceTree = SOURCE_ROOT; }; 33 | 3A5F6C161F274E0A0058DC36 /* ASPolylineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASPolylineView.h; sourceTree = SOURCE_ROOT; }; 34 | 3A5F6C171F274E0A0058DC36 /* ASPolylineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASPolylineView.m; sourceTree = SOURCE_ROOT; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 3A06C4FF1F274AC4004DB662 /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | 3A06C52A1F274BDE004DB662 /* MapKit.framework in Frameworks */, 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | 3A06C5181F274B2B004DB662 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | 3A06C52C1F274BEB004DB662 /* MapKit.framework in Frameworks */, 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXFrameworksBuildPhase section */ 55 | 56 | /* Begin PBXGroup section */ 57 | 3A06C4F91F274AC4004DB662 = { 58 | isa = PBXGroup; 59 | children = ( 60 | 3A06C50E1F274ADE004DB662 /* Classes */, 61 | 3A06C5051F274AC4004DB662 /* ASPolylineView-iOS */, 62 | 3A06C51D1F274B2B004DB662 /* ASPolylineView-macOS */, 63 | 3A06C5041F274AC4004DB662 /* Products */, 64 | 3A06C5281F274BDE004DB662 /* Frameworks */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | 3A06C5041F274AC4004DB662 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 3A06C5031F274AC4004DB662 /* ASPolylineView.framework */, 72 | 3A06C51C1F274B2B004DB662 /* ASPolylineView.framework */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | 3A06C5051F274AC4004DB662 /* ASPolylineView-iOS */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 3A06C5061F274AC4004DB662 /* ASPolylineView-iOS.h */, 81 | 3A06C5071F274AC4004DB662 /* Info.plist */, 82 | ); 83 | name = "ASPolylineView-iOS"; 84 | path = ASPolylineView; 85 | sourceTree = ""; 86 | }; 87 | 3A06C50E1F274ADE004DB662 /* Classes */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 3A5F6C141F274E0A0058DC36 /* ASPolylineRenderer.h */, 91 | 3A5F6C151F274E0A0058DC36 /* ASPolylineRenderer.m */, 92 | 3A5F6C161F274E0A0058DC36 /* ASPolylineView.h */, 93 | 3A5F6C171F274E0A0058DC36 /* ASPolylineView.m */, 94 | ); 95 | name = Classes; 96 | path = ASPolylineView; 97 | sourceTree = ""; 98 | }; 99 | 3A06C51D1F274B2B004DB662 /* ASPolylineView-macOS */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 3A06C51E1F274B2B004DB662 /* ASPolylineView-macOS.h */, 103 | 3A06C51F1F274B2B004DB662 /* Info.plist */, 104 | ); 105 | path = "ASPolylineView-macOS"; 106 | sourceTree = ""; 107 | }; 108 | 3A06C5281F274BDE004DB662 /* Frameworks */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 3A06C52B1F274BEB004DB662 /* MapKit.framework */, 112 | 3A06C5291F274BDE004DB662 /* MapKit.framework */, 113 | ); 114 | name = Frameworks; 115 | sourceTree = ""; 116 | }; 117 | /* End PBXGroup section */ 118 | 119 | /* Begin PBXHeadersBuildPhase section */ 120 | 3A06C5001F274AC4004DB662 /* Headers */ = { 121 | isa = PBXHeadersBuildPhase; 122 | buildActionMask = 2147483647; 123 | files = ( 124 | 3A06C5081F274AC4004DB662 /* ASPolylineView-iOS.h in Headers */, 125 | 3A5F6C181F274E0A0058DC36 /* ASPolylineRenderer.h in Headers */, 126 | 3A5F6C1C1F274E0A0058DC36 /* ASPolylineView.h in Headers */, 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | 3A06C5191F274B2B004DB662 /* Headers */ = { 131 | isa = PBXHeadersBuildPhase; 132 | buildActionMask = 2147483647; 133 | files = ( 134 | 3A06C5201F274B2B004DB662 /* ASPolylineView-macOS.h in Headers */, 135 | 3A5F6C191F274E0A0058DC36 /* ASPolylineRenderer.h in Headers */, 136 | ); 137 | runOnlyForDeploymentPostprocessing = 0; 138 | }; 139 | /* End PBXHeadersBuildPhase section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | 3A06C5021F274AC4004DB662 /* ASPolylineView-iOS */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 3A06C50B1F274AC4004DB662 /* Build configuration list for PBXNativeTarget "ASPolylineView-iOS" */; 145 | buildPhases = ( 146 | 3A06C4FE1F274AC4004DB662 /* Sources */, 147 | 3A06C4FF1F274AC4004DB662 /* Frameworks */, 148 | 3A06C5001F274AC4004DB662 /* Headers */, 149 | 3A06C5011F274AC4004DB662 /* Resources */, 150 | ); 151 | buildRules = ( 152 | ); 153 | dependencies = ( 154 | ); 155 | name = "ASPolylineView-iOS"; 156 | productName = ASPolylineView; 157 | productReference = 3A06C5031F274AC4004DB662 /* ASPolylineView.framework */; 158 | productType = "com.apple.product-type.framework"; 159 | }; 160 | 3A06C51B1F274B2B004DB662 /* ASPolylineView-macOS */ = { 161 | isa = PBXNativeTarget; 162 | buildConfigurationList = 3A06C5211F274B2B004DB662 /* Build configuration list for PBXNativeTarget "ASPolylineView-macOS" */; 163 | buildPhases = ( 164 | 3A06C5171F274B2B004DB662 /* Sources */, 165 | 3A06C5181F274B2B004DB662 /* Frameworks */, 166 | 3A06C5191F274B2B004DB662 /* Headers */, 167 | 3A06C51A1F274B2B004DB662 /* Resources */, 168 | ); 169 | buildRules = ( 170 | ); 171 | dependencies = ( 172 | ); 173 | name = "ASPolylineView-macOS"; 174 | productName = "ASPolylineView-macOS"; 175 | productReference = 3A06C51C1F274B2B004DB662 /* ASPolylineView.framework */; 176 | productType = "com.apple.product-type.framework"; 177 | }; 178 | /* End PBXNativeTarget section */ 179 | 180 | /* Begin PBXProject section */ 181 | 3A06C4FA1F274AC4004DB662 /* Project object */ = { 182 | isa = PBXProject; 183 | attributes = { 184 | LastUpgradeCheck = 0920; 185 | ORGANIZATIONNAME = "Adrian Schoenig"; 186 | TargetAttributes = { 187 | 3A06C5021F274AC4004DB662 = { 188 | CreatedOnToolsVersion = 8.3.3; 189 | DevelopmentTeam = 7N3B54ALZK; 190 | ProvisioningStyle = Automatic; 191 | }; 192 | 3A06C51B1F274B2B004DB662 = { 193 | CreatedOnToolsVersion = 8.3.3; 194 | DevelopmentTeam = 7N3B54ALZK; 195 | ProvisioningStyle = Automatic; 196 | }; 197 | }; 198 | }; 199 | buildConfigurationList = 3A06C4FD1F274AC4004DB662 /* Build configuration list for PBXProject "ASPolylineView" */; 200 | compatibilityVersion = "Xcode 3.2"; 201 | developmentRegion = English; 202 | hasScannedForEncodings = 0; 203 | knownRegions = ( 204 | en, 205 | ); 206 | mainGroup = 3A06C4F91F274AC4004DB662; 207 | productRefGroup = 3A06C5041F274AC4004DB662 /* Products */; 208 | projectDirPath = ""; 209 | projectRoot = ""; 210 | targets = ( 211 | 3A06C5021F274AC4004DB662 /* ASPolylineView-iOS */, 212 | 3A06C51B1F274B2B004DB662 /* ASPolylineView-macOS */, 213 | ); 214 | }; 215 | /* End PBXProject section */ 216 | 217 | /* Begin PBXResourcesBuildPhase section */ 218 | 3A06C5011F274AC4004DB662 /* Resources */ = { 219 | isa = PBXResourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | 3A06C51A1F274B2B004DB662 /* Resources */ = { 226 | isa = PBXResourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXResourcesBuildPhase section */ 233 | 234 | /* Begin PBXSourcesBuildPhase section */ 235 | 3A06C4FE1F274AC4004DB662 /* Sources */ = { 236 | isa = PBXSourcesBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | 3A5F6C1E1F274E0A0058DC36 /* ASPolylineView.m in Sources */, 240 | 3A5F6C1A1F274E0A0058DC36 /* ASPolylineRenderer.m in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | 3A06C5171F274B2B004DB662 /* Sources */ = { 245 | isa = PBXSourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | 3A5F6C1B1F274E0A0058DC36 /* ASPolylineRenderer.m in Sources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | /* End PBXSourcesBuildPhase section */ 253 | 254 | /* Begin XCBuildConfiguration section */ 255 | 3A06C5091F274AC4004DB662 /* Debug */ = { 256 | isa = XCBuildConfiguration; 257 | buildSettings = { 258 | ALWAYS_SEARCH_USER_PATHS = NO; 259 | CLANG_ANALYZER_NONNULL = YES; 260 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 261 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 262 | CLANG_CXX_LIBRARY = "libc++"; 263 | CLANG_ENABLE_MODULES = YES; 264 | CLANG_ENABLE_OBJC_ARC = YES; 265 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 266 | CLANG_WARN_BOOL_CONVERSION = YES; 267 | CLANG_WARN_COMMA = YES; 268 | CLANG_WARN_CONSTANT_CONVERSION = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 271 | CLANG_WARN_EMPTY_BODY = YES; 272 | CLANG_WARN_ENUM_CONVERSION = YES; 273 | CLANG_WARN_INFINITE_RECURSION = YES; 274 | CLANG_WARN_INT_CONVERSION = YES; 275 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | CURRENT_PROJECT_VERSION = 1; 286 | DEBUG_INFORMATION_FORMAT = dwarf; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | ENABLE_TESTABILITY = YES; 289 | GCC_C_LANGUAGE_STANDARD = gnu99; 290 | GCC_DYNAMIC_NO_PIC = NO; 291 | GCC_NO_COMMON_BLOCKS = YES; 292 | GCC_OPTIMIZATION_LEVEL = 0; 293 | GCC_PREPROCESSOR_DEFINITIONS = ( 294 | "DEBUG=1", 295 | "$(inherited)", 296 | ); 297 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 298 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 299 | GCC_WARN_UNDECLARED_SELECTOR = YES; 300 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 301 | GCC_WARN_UNUSED_FUNCTION = YES; 302 | GCC_WARN_UNUSED_VARIABLE = YES; 303 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 304 | MTL_ENABLE_DEBUG_INFO = YES; 305 | ONLY_ACTIVE_ARCH = YES; 306 | SDKROOT = iphoneos; 307 | TARGETED_DEVICE_FAMILY = "1,2"; 308 | VERSIONING_SYSTEM = "apple-generic"; 309 | VERSION_INFO_PREFIX = ""; 310 | }; 311 | name = Debug; 312 | }; 313 | 3A06C50A1F274AC4004DB662 /* Release */ = { 314 | isa = XCBuildConfiguration; 315 | buildSettings = { 316 | ALWAYS_SEARCH_USER_PATHS = NO; 317 | CLANG_ANALYZER_NONNULL = YES; 318 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 319 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 320 | CLANG_CXX_LIBRARY = "libc++"; 321 | CLANG_ENABLE_MODULES = YES; 322 | CLANG_ENABLE_OBJC_ARC = YES; 323 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 324 | CLANG_WARN_BOOL_CONVERSION = YES; 325 | CLANG_WARN_COMMA = YES; 326 | CLANG_WARN_CONSTANT_CONVERSION = YES; 327 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 328 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 329 | CLANG_WARN_EMPTY_BODY = YES; 330 | CLANG_WARN_ENUM_CONVERSION = YES; 331 | CLANG_WARN_INFINITE_RECURSION = YES; 332 | CLANG_WARN_INT_CONVERSION = YES; 333 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 334 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 335 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 336 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 337 | CLANG_WARN_STRICT_PROTOTYPES = YES; 338 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 339 | CLANG_WARN_UNREACHABLE_CODE = YES; 340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 342 | COPY_PHASE_STRIP = NO; 343 | CURRENT_PROJECT_VERSION = 1; 344 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 345 | ENABLE_NS_ASSERTIONS = NO; 346 | ENABLE_STRICT_OBJC_MSGSEND = YES; 347 | GCC_C_LANGUAGE_STANDARD = gnu99; 348 | GCC_NO_COMMON_BLOCKS = YES; 349 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 350 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 351 | GCC_WARN_UNDECLARED_SELECTOR = YES; 352 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 353 | GCC_WARN_UNUSED_FUNCTION = YES; 354 | GCC_WARN_UNUSED_VARIABLE = YES; 355 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 356 | MTL_ENABLE_DEBUG_INFO = NO; 357 | SDKROOT = iphoneos; 358 | TARGETED_DEVICE_FAMILY = "1,2"; 359 | VALIDATE_PRODUCT = YES; 360 | VERSIONING_SYSTEM = "apple-generic"; 361 | VERSION_INFO_PREFIX = ""; 362 | }; 363 | name = Release; 364 | }; 365 | 3A06C50C1F274AC4004DB662 /* Debug */ = { 366 | isa = XCBuildConfiguration; 367 | buildSettings = { 368 | APPLICATION_EXTENSION_API_ONLY = YES; 369 | CODE_SIGN_IDENTITY = ""; 370 | DEFINES_MODULE = YES; 371 | DEVELOPMENT_TEAM = 7N3B54ALZK; 372 | DYLIB_COMPATIBILITY_VERSION = 1; 373 | DYLIB_CURRENT_VERSION = 1; 374 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 375 | INFOPLIST_FILE = ASPolylineView/Info.plist; 376 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 377 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 378 | PRODUCT_BUNDLE_IDENTIFIER = me.schoenig.adrian.ASPolylineView; 379 | PRODUCT_NAME = ASPolylineView; 380 | SKIP_INSTALL = YES; 381 | }; 382 | name = Debug; 383 | }; 384 | 3A06C50D1F274AC4004DB662 /* Release */ = { 385 | isa = XCBuildConfiguration; 386 | buildSettings = { 387 | APPLICATION_EXTENSION_API_ONLY = YES; 388 | CODE_SIGN_IDENTITY = ""; 389 | DEFINES_MODULE = YES; 390 | DEVELOPMENT_TEAM = 7N3B54ALZK; 391 | DYLIB_COMPATIBILITY_VERSION = 1; 392 | DYLIB_CURRENT_VERSION = 1; 393 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 394 | INFOPLIST_FILE = ASPolylineView/Info.plist; 395 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 397 | PRODUCT_BUNDLE_IDENTIFIER = me.schoenig.adrian.ASPolylineView; 398 | PRODUCT_NAME = ASPolylineView; 399 | SKIP_INSTALL = YES; 400 | }; 401 | name = Release; 402 | }; 403 | 3A06C5221F274B2B004DB662 /* Debug */ = { 404 | isa = XCBuildConfiguration; 405 | buildSettings = { 406 | APPLICATION_EXTENSION_API_ONLY = YES; 407 | CODE_SIGN_IDENTITY = "-"; 408 | COMBINE_HIDPI_IMAGES = YES; 409 | DEFINES_MODULE = YES; 410 | DEVELOPMENT_TEAM = 7N3B54ALZK; 411 | DYLIB_COMPATIBILITY_VERSION = 1; 412 | DYLIB_CURRENT_VERSION = 1; 413 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 414 | FRAMEWORK_VERSION = A; 415 | INFOPLIST_FILE = "ASPolylineView-macOS/Info.plist"; 416 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 418 | MACOSX_DEPLOYMENT_TARGET = 10.12; 419 | PRODUCT_BUNDLE_IDENTIFIER = "me.schoenig.adrian.ASPolylineView-macOS"; 420 | PRODUCT_NAME = ASPolylineView; 421 | SDKROOT = macosx; 422 | SKIP_INSTALL = YES; 423 | }; 424 | name = Debug; 425 | }; 426 | 3A06C5231F274B2B004DB662 /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | APPLICATION_EXTENSION_API_ONLY = YES; 430 | CODE_SIGN_IDENTITY = "-"; 431 | COMBINE_HIDPI_IMAGES = YES; 432 | DEFINES_MODULE = YES; 433 | DEVELOPMENT_TEAM = 7N3B54ALZK; 434 | DYLIB_COMPATIBILITY_VERSION = 1; 435 | DYLIB_CURRENT_VERSION = 1; 436 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 437 | FRAMEWORK_VERSION = A; 438 | INFOPLIST_FILE = "ASPolylineView-macOS/Info.plist"; 439 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 441 | MACOSX_DEPLOYMENT_TARGET = 10.12; 442 | PRODUCT_BUNDLE_IDENTIFIER = "me.schoenig.adrian.ASPolylineView-macOS"; 443 | PRODUCT_NAME = ASPolylineView; 444 | SDKROOT = macosx; 445 | SKIP_INSTALL = YES; 446 | }; 447 | name = Release; 448 | }; 449 | /* End XCBuildConfiguration section */ 450 | 451 | /* Begin XCConfigurationList section */ 452 | 3A06C4FD1F274AC4004DB662 /* Build configuration list for PBXProject "ASPolylineView" */ = { 453 | isa = XCConfigurationList; 454 | buildConfigurations = ( 455 | 3A06C5091F274AC4004DB662 /* Debug */, 456 | 3A06C50A1F274AC4004DB662 /* Release */, 457 | ); 458 | defaultConfigurationIsVisible = 0; 459 | defaultConfigurationName = Release; 460 | }; 461 | 3A06C50B1F274AC4004DB662 /* Build configuration list for PBXNativeTarget "ASPolylineView-iOS" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 3A06C50C1F274AC4004DB662 /* Debug */, 465 | 3A06C50D1F274AC4004DB662 /* Release */, 466 | ); 467 | defaultConfigurationIsVisible = 0; 468 | defaultConfigurationName = Release; 469 | }; 470 | 3A06C5211F274B2B004DB662 /* Build configuration list for PBXNativeTarget "ASPolylineView-macOS" */ = { 471 | isa = XCConfigurationList; 472 | buildConfigurations = ( 473 | 3A06C5221F274B2B004DB662 /* Debug */, 474 | 3A06C5231F274B2B004DB662 /* Release */, 475 | ); 476 | defaultConfigurationIsVisible = 0; 477 | defaultConfigurationName = Release; 478 | }; 479 | /* End XCConfigurationList section */ 480 | }; 481 | rootObject = 3A06C4FA1F274AC4004DB662 /* Project object */; 482 | } 483 | -------------------------------------------------------------------------------- /ASPolylineView.xcodeproj/xcshareddata/xcschemes/ASPolylineView-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 72 | 73 | 74 | 75 | 77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /ASPolylineView.xcodeproj/xcshareddata/xcschemes/ASPolylineView-macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 72 | 73 | 74 | 75 | 77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /ASPolylineView/ASPolylineView-iOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASPolylineView.h 3 | // ASPolylineView 4 | // 5 | // Created by Adrian Schoenig on 25/7/17. 6 | // Copyright © 2017 Adrian Schoenig. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ASPolylineView. 12 | FOUNDATION_EXPORT double ASPolylineViewVersionNumber; 13 | 14 | //! Project version string for ASPolylineView. 15 | FOUNDATION_EXPORT const unsigned char ASPolylineViewVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | #import 21 | -------------------------------------------------------------------------------- /ASPolylineView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Adrian Schoenig 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 17 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | 24 | The views and conclusions contained in the software and documentation are those 25 | of the authors and should not be interpreted as representing official policies, 26 | either expressed or implied, of the FreeBSD Project. -------------------------------------------------------------------------------- /PolylineExample/PolylineExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3A16167D1733872C00F6FE0F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A16167C1733872C00F6FE0F /* QuartzCore.framework */; }; 11 | 3A202C4917328F82009F668B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A202C4817328F82009F668B /* UIKit.framework */; }; 12 | 3A202C4B17328F82009F668B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A202C4A17328F82009F668B /* Foundation.framework */; }; 13 | 3A202C4D17328F82009F668B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A202C4C17328F82009F668B /* CoreGraphics.framework */; }; 14 | 3A202C5317328F82009F668B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3A202C5117328F82009F668B /* InfoPlist.strings */; }; 15 | 3A202C5517328F82009F668B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A202C5417328F82009F668B /* main.m */; }; 16 | 3A202C5917328F82009F668B /* ASAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A202C5817328F82009F668B /* ASAppDelegate.m */; }; 17 | 3A202C5B17328F82009F668B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A202C5A17328F82009F668B /* Default.png */; }; 18 | 3A202C5D17328F82009F668B /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A202C5C17328F82009F668B /* Default@2x.png */; }; 19 | 3A202C5F17328F82009F668B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A202C5E17328F82009F668B /* Default-568h@2x.png */; }; 20 | 3A202C6217328F82009F668B /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3A202C6017328F82009F668B /* MainStoryboard.storyboard */; }; 21 | 3A202C6517328F82009F668B /* ASViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A202C6417328F82009F668B /* ASViewController.m */; }; 22 | 3A202C6E17328FD9009F668B /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A202C6D17328FD9009F668B /* MapKit.framework */; }; 23 | 3A202C70173291C8009F668B /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A202C6F173291C8009F668B /* CoreLocation.framework */; }; 24 | 3A202C71173291D6009F668B /* ASPolylineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A202C6C17328F9E009F668B /* ASPolylineView.m */; }; 25 | 3A23D6F017BD2B3F00C0F2F7 /* ASPolylineRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A23D6EF17BD2B3F00C0F2F7 /* ASPolylineRenderer.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 3A16167C1733872C00F6FE0F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 30 | 3A202C4517328F82009F668B /* PolylineExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PolylineExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 3A202C4817328F82009F668B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 32 | 3A202C4A17328F82009F668B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 33 | 3A202C4C17328F82009F668B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 34 | 3A202C5017328F82009F668B /* PolylineExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PolylineExample-Info.plist"; sourceTree = ""; }; 35 | 3A202C5217328F82009F668B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 36 | 3A202C5417328F82009F668B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 37 | 3A202C5617328F82009F668B /* PolylineExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PolylineExample-Prefix.pch"; sourceTree = ""; }; 38 | 3A202C5717328F82009F668B /* ASAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASAppDelegate.h; sourceTree = ""; }; 39 | 3A202C5817328F82009F668B /* ASAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASAppDelegate.m; sourceTree = ""; }; 40 | 3A202C5A17328F82009F668B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 41 | 3A202C5C17328F82009F668B /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 42 | 3A202C5E17328F82009F668B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 43 | 3A202C6117328F82009F668B /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; 44 | 3A202C6317328F82009F668B /* ASViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASViewController.h; sourceTree = ""; }; 45 | 3A202C6417328F82009F668B /* ASViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASViewController.m; sourceTree = ""; }; 46 | 3A202C6B17328F9D009F668B /* ASPolylineView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ASPolylineView.h; path = ../../ASPolylineView.h; sourceTree = ""; }; 47 | 3A202C6C17328F9E009F668B /* ASPolylineView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ASPolylineView.m; path = ../../ASPolylineView.m; sourceTree = ""; }; 48 | 3A202C6D17328FD9009F668B /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 49 | 3A202C6F173291C8009F668B /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 50 | 3A23D6EE17BD2B3F00C0F2F7 /* ASPolylineRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASPolylineRenderer.h; path = ../../ASPolylineRenderer.h; sourceTree = ""; }; 51 | 3A23D6EF17BD2B3F00C0F2F7 /* ASPolylineRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ASPolylineRenderer.m; path = ../../ASPolylineRenderer.m; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 3A202C4217328F82009F668B /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 3A16167D1733872C00F6FE0F /* QuartzCore.framework in Frameworks */, 60 | 3A202C70173291C8009F668B /* CoreLocation.framework in Frameworks */, 61 | 3A202C6E17328FD9009F668B /* MapKit.framework in Frameworks */, 62 | 3A202C4917328F82009F668B /* UIKit.framework in Frameworks */, 63 | 3A202C4B17328F82009F668B /* Foundation.framework in Frameworks */, 64 | 3A202C4D17328F82009F668B /* CoreGraphics.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 3A202C3C17328F82009F668B = { 72 | isa = PBXGroup; 73 | children = ( 74 | 3A202C4E17328F82009F668B /* PolylineExample */, 75 | 3A202C4717328F82009F668B /* Frameworks */, 76 | 3A202C4617328F82009F668B /* Products */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | 3A202C4617328F82009F668B /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 3A202C4517328F82009F668B /* PolylineExample.app */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | 3A202C4717328F82009F668B /* Frameworks */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 3A16167C1733872C00F6FE0F /* QuartzCore.framework */, 92 | 3A202C6F173291C8009F668B /* CoreLocation.framework */, 93 | 3A202C6D17328FD9009F668B /* MapKit.framework */, 94 | 3A202C4817328F82009F668B /* UIKit.framework */, 95 | 3A202C4A17328F82009F668B /* Foundation.framework */, 96 | 3A202C4C17328F82009F668B /* CoreGraphics.framework */, 97 | ); 98 | name = Frameworks; 99 | sourceTree = ""; 100 | }; 101 | 3A202C4E17328F82009F668B /* PolylineExample */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 3A23D6EE17BD2B3F00C0F2F7 /* ASPolylineRenderer.h */, 105 | 3A23D6EF17BD2B3F00C0F2F7 /* ASPolylineRenderer.m */, 106 | 3A202C6B17328F9D009F668B /* ASPolylineView.h */, 107 | 3A202C6C17328F9E009F668B /* ASPolylineView.m */, 108 | 3A202C5717328F82009F668B /* ASAppDelegate.h */, 109 | 3A202C5817328F82009F668B /* ASAppDelegate.m */, 110 | 3A202C6017328F82009F668B /* MainStoryboard.storyboard */, 111 | 3A202C6317328F82009F668B /* ASViewController.h */, 112 | 3A202C6417328F82009F668B /* ASViewController.m */, 113 | 3A202C4F17328F82009F668B /* Supporting Files */, 114 | ); 115 | path = PolylineExample; 116 | sourceTree = ""; 117 | }; 118 | 3A202C4F17328F82009F668B /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 3A202C5017328F82009F668B /* PolylineExample-Info.plist */, 122 | 3A202C5117328F82009F668B /* InfoPlist.strings */, 123 | 3A202C5417328F82009F668B /* main.m */, 124 | 3A202C5617328F82009F668B /* PolylineExample-Prefix.pch */, 125 | 3A202C5A17328F82009F668B /* Default.png */, 126 | 3A202C5C17328F82009F668B /* Default@2x.png */, 127 | 3A202C5E17328F82009F668B /* Default-568h@2x.png */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXNativeTarget section */ 135 | 3A202C4417328F82009F668B /* PolylineExample */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = 3A202C6817328F82009F668B /* Build configuration list for PBXNativeTarget "PolylineExample" */; 138 | buildPhases = ( 139 | 3A202C4117328F82009F668B /* Sources */, 140 | 3A202C4217328F82009F668B /* Frameworks */, 141 | 3A202C4317328F82009F668B /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = PolylineExample; 148 | productName = PolylineExample; 149 | productReference = 3A202C4517328F82009F668B /* PolylineExample.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | /* End PBXNativeTarget section */ 153 | 154 | /* Begin PBXProject section */ 155 | 3A202C3D17328F82009F668B /* Project object */ = { 156 | isa = PBXProject; 157 | attributes = { 158 | CLASSPREFIX = AS; 159 | LastUpgradeCheck = 0830; 160 | ORGANIZATIONNAME = "Adrian Schoenig"; 161 | TargetAttributes = { 162 | 3A202C4417328F82009F668B = { 163 | DevelopmentTeam = 7N3B54ALZK; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 3A202C4017328F82009F668B /* Build configuration list for PBXProject "PolylineExample" */; 168 | compatibilityVersion = "Xcode 3.2"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | ); 174 | mainGroup = 3A202C3C17328F82009F668B; 175 | productRefGroup = 3A202C4617328F82009F668B /* Products */; 176 | projectDirPath = ""; 177 | projectRoot = ""; 178 | targets = ( 179 | 3A202C4417328F82009F668B /* PolylineExample */, 180 | ); 181 | }; 182 | /* End PBXProject section */ 183 | 184 | /* Begin PBXResourcesBuildPhase section */ 185 | 3A202C4317328F82009F668B /* Resources */ = { 186 | isa = PBXResourcesBuildPhase; 187 | buildActionMask = 2147483647; 188 | files = ( 189 | 3A202C5317328F82009F668B /* InfoPlist.strings in Resources */, 190 | 3A202C5B17328F82009F668B /* Default.png in Resources */, 191 | 3A202C5D17328F82009F668B /* Default@2x.png in Resources */, 192 | 3A202C5F17328F82009F668B /* Default-568h@2x.png in Resources */, 193 | 3A202C6217328F82009F668B /* MainStoryboard.storyboard in Resources */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | /* End PBXResourcesBuildPhase section */ 198 | 199 | /* Begin PBXSourcesBuildPhase section */ 200 | 3A202C4117328F82009F668B /* Sources */ = { 201 | isa = PBXSourcesBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | 3A202C5517328F82009F668B /* main.m in Sources */, 205 | 3A202C5917328F82009F668B /* ASAppDelegate.m in Sources */, 206 | 3A202C6517328F82009F668B /* ASViewController.m in Sources */, 207 | 3A23D6F017BD2B3F00C0F2F7 /* ASPolylineRenderer.m in Sources */, 208 | 3A202C71173291D6009F668B /* ASPolylineView.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 3A202C5117328F82009F668B /* InfoPlist.strings */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 3A202C5217328F82009F668B /* en */, 219 | ); 220 | name = InfoPlist.strings; 221 | sourceTree = ""; 222 | }; 223 | 3A202C6017328F82009F668B /* MainStoryboard.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 3A202C6117328F82009F668B /* en */, 227 | ); 228 | name = MainStoryboard.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 3A202C6617328F82009F668B /* Debug */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 239 | CLANG_CXX_LIBRARY = "libc++"; 240 | CLANG_ENABLE_OBJC_ARC = YES; 241 | CLANG_WARN_BOOL_CONVERSION = YES; 242 | CLANG_WARN_CONSTANT_CONVERSION = YES; 243 | CLANG_WARN_EMPTY_BODY = YES; 244 | CLANG_WARN_ENUM_CONVERSION = YES; 245 | CLANG_WARN_INFINITE_RECURSION = YES; 246 | CLANG_WARN_INT_CONVERSION = YES; 247 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 248 | CLANG_WARN_UNREACHABLE_CODE = YES; 249 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 250 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 251 | COPY_PHASE_STRIP = NO; 252 | ENABLE_STRICT_OBJC_MSGSEND = YES; 253 | ENABLE_TESTABILITY = YES; 254 | GCC_C_LANGUAGE_STANDARD = gnu99; 255 | GCC_DYNAMIC_NO_PIC = NO; 256 | GCC_NO_COMMON_BLOCKS = YES; 257 | GCC_OPTIMIZATION_LEVEL = 0; 258 | GCC_PREPROCESSOR_DEFINITIONS = ( 259 | "DEBUG=1", 260 | "$(inherited)", 261 | ); 262 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 263 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 264 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 265 | GCC_WARN_UNDECLARED_SELECTOR = YES; 266 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 267 | GCC_WARN_UNUSED_FUNCTION = YES; 268 | GCC_WARN_UNUSED_VARIABLE = YES; 269 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 270 | ONLY_ACTIVE_ARCH = YES; 271 | SDKROOT = iphoneos; 272 | }; 273 | name = Debug; 274 | }; 275 | 3A202C6717328F82009F668B /* Release */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ALWAYS_SEARCH_USER_PATHS = NO; 279 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 280 | CLANG_CXX_LIBRARY = "libc++"; 281 | CLANG_ENABLE_OBJC_ARC = YES; 282 | CLANG_WARN_BOOL_CONVERSION = YES; 283 | CLANG_WARN_CONSTANT_CONVERSION = YES; 284 | CLANG_WARN_EMPTY_BODY = YES; 285 | CLANG_WARN_ENUM_CONVERSION = YES; 286 | CLANG_WARN_INFINITE_RECURSION = YES; 287 | CLANG_WARN_INT_CONVERSION = YES; 288 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 289 | CLANG_WARN_UNREACHABLE_CODE = YES; 290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 291 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 292 | COPY_PHASE_STRIP = YES; 293 | ENABLE_STRICT_OBJC_MSGSEND = YES; 294 | GCC_C_LANGUAGE_STANDARD = gnu99; 295 | GCC_NO_COMMON_BLOCKS = YES; 296 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 297 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 298 | GCC_WARN_UNDECLARED_SELECTOR = YES; 299 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 300 | GCC_WARN_UNUSED_FUNCTION = YES; 301 | GCC_WARN_UNUSED_VARIABLE = YES; 302 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 303 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 304 | SDKROOT = iphoneos; 305 | VALIDATE_PRODUCT = YES; 306 | }; 307 | name = Release; 308 | }; 309 | 3A202C6917328F82009F668B /* Debug */ = { 310 | isa = XCBuildConfiguration; 311 | buildSettings = { 312 | CODE_SIGN_IDENTITY = "iPhone Developer"; 313 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 314 | GCC_PREFIX_HEADER = "PolylineExample/PolylineExample-Prefix.pch"; 315 | INFOPLIST_FILE = "PolylineExample/PolylineExample-Info.plist"; 316 | PRODUCT_BUNDLE_IDENTIFIER = "net.byadrian.${PRODUCT_NAME:rfc1034identifier}"; 317 | PRODUCT_NAME = "$(TARGET_NAME)"; 318 | WRAPPER_EXTENSION = app; 319 | }; 320 | name = Debug; 321 | }; 322 | 3A202C6A17328F82009F668B /* Release */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | CODE_SIGN_IDENTITY = "iPhone Developer"; 326 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 327 | GCC_PREFIX_HEADER = "PolylineExample/PolylineExample-Prefix.pch"; 328 | INFOPLIST_FILE = "PolylineExample/PolylineExample-Info.plist"; 329 | PRODUCT_BUNDLE_IDENTIFIER = "net.byadrian.${PRODUCT_NAME:rfc1034identifier}"; 330 | PRODUCT_NAME = "$(TARGET_NAME)"; 331 | WRAPPER_EXTENSION = app; 332 | }; 333 | name = Release; 334 | }; 335 | /* End XCBuildConfiguration section */ 336 | 337 | /* Begin XCConfigurationList section */ 338 | 3A202C4017328F82009F668B /* Build configuration list for PBXProject "PolylineExample" */ = { 339 | isa = XCConfigurationList; 340 | buildConfigurations = ( 341 | 3A202C6617328F82009F668B /* Debug */, 342 | 3A202C6717328F82009F668B /* Release */, 343 | ); 344 | defaultConfigurationIsVisible = 0; 345 | defaultConfigurationName = Release; 346 | }; 347 | 3A202C6817328F82009F668B /* Build configuration list for PBXNativeTarget "PolylineExample" */ = { 348 | isa = XCConfigurationList; 349 | buildConfigurations = ( 350 | 3A202C6917328F82009F668B /* Debug */, 351 | 3A202C6A17328F82009F668B /* Release */, 352 | ); 353 | defaultConfigurationIsVisible = 0; 354 | defaultConfigurationName = Release; 355 | }; 356 | /* End XCConfigurationList section */ 357 | }; 358 | rootObject = 3A202C3D17328F82009F668B /* Project object */; 359 | } 360 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/ASAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASAppDelegate.h 3 | // PolylineExample 4 | // 5 | // Created by Adrian Schoenig on 2/05/13. 6 | // Copyright (c) 2013 Adrian Schoenig. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ASAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/ASAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASAppDelegate.m 3 | // PolylineExample 4 | // 5 | // Created by Adrian Schoenig on 2/05/13. 6 | // Copyright (c) 2013 Adrian Schoenig. All rights reserved. 7 | // 8 | 9 | #import "ASAppDelegate.h" 10 | 11 | @implementation ASAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/ASViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASViewController.h 3 | // PolylineExample 4 | // 5 | // Created by Adrian Schoenig on 2/05/13. 6 | // Copyright (c) 2013 Adrian Schoenig. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface ASViewController : UIViewController 14 | 15 | @property (weak, nonatomic) IBOutlet MKMapView *mapView; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/ASViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASViewController.m 3 | // PolylineExample 4 | // 5 | // Created by Adrian Schoenig on 2/05/13. 6 | // Copyright (c) 2013 Adrian Schoenig. All rights reserved. 7 | // 8 | 9 | #import "ASViewController.h" 10 | 11 | #import 12 | 13 | #import "ASPolylineView.h" 14 | #import "ASPolylineRenderer.h" 15 | 16 | @implementation ASViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | 22 | CLLocationCoordinate2D coordinates[6] = { 23 | CLLocationCoordinate2DMake(-33.932725,151.222), 24 | CLLocationCoordinate2DMake(-33.9125,151.222), // midway 25 | CLLocationCoordinate2DMake(-33.892077,151.222), 26 | CLLocationCoordinate2DMake(-33.937663,151.178), 27 | CLLocationCoordinate2DMake(-33.912563,151.178), // midway 28 | CLLocationCoordinate2DMake(-33.895497,151.178), 29 | }; 30 | 31 | // draw as two separate overlays to draw a bridge 32 | CLLocationCoordinate2D first[4] = { 33 | coordinates[1], 34 | coordinates[2], 35 | coordinates[3], 36 | coordinates[4], 37 | }; 38 | 39 | CLLocationCoordinate2D second[4] = { 40 | coordinates[4], 41 | coordinates[5], 42 | coordinates[0], 43 | coordinates[1], 44 | }; 45 | 46 | [self.mapView addOverlay:[MKPolyline polylineWithCoordinates:first count:4]]; 47 | [self.mapView addOverlay:[MKPolyline polylineWithCoordinates:second count:4]]; 48 | 49 | // zoom to all 50 | [self.mapView setVisibleMapRect:[self mapRectForCoordinates:coordinates count:6]]; 51 | } 52 | 53 | - (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id)overlay 54 | { 55 | if ([overlay isKindOfClass:[MKPolyline class]]) { 56 | ASPolylineView *polylineView = [[ASPolylineView alloc] initWithPolyline:(MKPolyline *)overlay]; 57 | polylineView.strokeColor = [UIColor yellowColor]; 58 | polylineView.lineWidth = 8.0f; 59 | polylineView.lineJoin = kCGLineJoinRound; 60 | polylineView.lineCap = kCGLineCapButt; 61 | return polylineView; 62 | } else { 63 | return nil; 64 | } 65 | } 66 | 67 | - (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id)overlay 68 | { 69 | if ([overlay isKindOfClass:[MKPolyline class]]) { 70 | ASPolylineRenderer *polylineRenderer = [[ASPolylineRenderer alloc] initWithPolyline:(MKPolyline *)overlay]; 71 | polylineRenderer.strokeColor = [UIColor yellowColor]; 72 | polylineRenderer.lineWidth = 8.0f; 73 | polylineRenderer.lineJoin = kCGLineJoinRound; 74 | polylineRenderer.lineCap = kCGLineCapButt; 75 | return polylineRenderer; 76 | } else { 77 | return nil; 78 | } 79 | } 80 | 81 | - (MKMapRect)mapRectForCoordinates:(CLLocationCoordinate2D *)coordinates 82 | count:(NSUInteger)count 83 | { 84 | MKMapRect mapRect = MKMapRectNull; 85 | for (int i = 0; i < count; i++) { 86 | MKMapPoint mapPoint = MKMapPointForCoordinate(coordinates[i]); 87 | MKMapRect newRect = MKMapRectMake(mapPoint.x, mapPoint.y, 1.0, 1.0); 88 | mapRect = MKMapRectUnion(mapRect, newRect); 89 | } 90 | return mapRect; 91 | } 92 | 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nighthawk/ASPolylineView/d6e2412cf4af1640f5359904834349af0b6815f5/PolylineExample/PolylineExample/Default-568h@2x.png -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nighthawk/ASPolylineView/d6e2412cf4af1640f5359904834349af0b6815f5/PolylineExample/PolylineExample/Default.png -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nighthawk/ASPolylineView/d6e2412cf4af1640f5359904834349af0b6815f5/PolylineExample/PolylineExample/Default@2x.png -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/PolylineExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/PolylineExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'PolylineExample' target in the 'PolylineExample' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/en.lproj/MainStoryboard.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /PolylineExample/PolylineExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PolylineExample 4 | // 5 | // Created by Adrian Schoenig on 2/05/13. 6 | // Copyright (c) 2013 Adrian Schoenig. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "ASAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ASAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ASPolylineView 2 | ============== 3 | 4 | [![Badge w/ Version](http://cocoapod-badges.herokuapp.com/v/ASPolylineView/badge.png)](http://cocoadocs.org/docsets/ASPolylineView) 5 | [![Badge w/ Platform](http://cocoapod-badges.herokuapp.com/p/ASPolylineView/badge.png)](http://cocoadocs.org/docsets/ASPolylineView) 6 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | 8 | 9 | Drop-in replacements for MKPolylineRenderer and MKPolylineView with more customisation options. 10 | 11 | Primarily let's you draw a coloured border around a line. 12 | 13 | Can be used instead of `MKPolylineRenderer` or `MKPolylineView`. Adds the border by default. To change the colour supply the `borderColor` property. The `borderMultiplier` controls the width of that border. 14 | 15 | ## Installation 16 | 17 | ### Cocoapods 18 | 19 | Add this to your `Podfile`: 20 | 21 | ```ruby 22 | pod 'ASPolylineView' 23 | ``` 24 | 25 | Then run `pod update` 26 | 27 | ### Carthage 28 | 29 | Add this to your `Cartfile`: 30 | 31 | ``` 32 | github "nighthawk/ASPolylineView" 33 | ``` 34 | 35 | Then run `carthage update` and add the framework to your project as described in the [Carthage docs](https://github.com/Carthage/Carthage). 36 | --------------------------------------------------------------------------------