Skip to content

Commit

Permalink
Add Carthage compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Schoenig committed Jul 25, 2017
1 parent 336d631 commit 160a08b
Show file tree
Hide file tree
Showing 12 changed files with 757 additions and 9 deletions.
10 changes: 8 additions & 2 deletions ASPolylineRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@

#import <MapKit/MapKit.h>

#if TARGET_OS_IPHONE
#define ASColor UIColor
#else
#define ASColor NSColor
#endif

@interface ASPolylineRenderer : MKOverlayPathRenderer

/* The color used for the wider border around the polyline.
* Defaults to black.
*/
@property (nonatomic, strong) UIColor *borderColor;
@property (nonatomic, strong) ASColor *borderColor;

/* The color used as the backdrop if there's a dash pattern.
* Defaults to white.
*/
@property (nonatomic, strong) UIColor *backgroundColor;
@property (nonatomic, strong) ASColor *backgroundColor;


/* The factor by which the border expands past the line.
Expand Down
4 changes: 2 additions & 2 deletions ASPolylineRenderer.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ - (id)initWithPolyline:(MKPolyline *)polyline
[self constructPath];

// defaults
self.borderColor = [UIColor blackColor];
self.backgroundColor = [UIColor whiteColor];
self.borderColor = [ASColor blackColor];
self.backgroundColor = [ASColor whiteColor];
self.borderMultiplier = 2.0;
}
return self;
Expand Down
20 changes: 20 additions & 0 deletions ASPolylineView-macOS/ASPolylineView-macOS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// ASPolylineView-macOS.h
// ASPolylineView-macOS
//
// Created by Adrian Schoenig on 25/7/17.
// Copyright © 2017 Adrian Schoenig. All rights reserved.
//

#import <Cocoa/Cocoa.h>

//! Project version number for ASPolylineView-macOS.
FOUNDATION_EXPORT double ASPolylineView_macOSVersionNumber;

//! Project version string for ASPolylineView-macOS.
FOUNDATION_EXPORT const unsigned char ASPolylineView_macOSVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <ASPolylineView_macOS/PublicHeader.h>

#import <ASPolylineView/ASPolylineRenderer.h>

26 changes: 26 additions & 0 deletions ASPolylineView-macOS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 Adrian Schoenig. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
Loading

0 comments on commit 160a08b

Please sign in to comment.