Skip to content

Commit a320a64

Browse files
committed
refs mapbox#326: revert to upstream, finalized iOS 7 callouts
1 parent 3287fe2 commit a320a64

5 files changed

Lines changed: 16 additions & 9 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
url = https://github.com/groue/GRMustache.git
77
[submodule "MapView/Map/SMCalloutView"]
88
path = MapView/Map/SMCalloutView
9-
url = https://github.com/mapbox/SMCalloutView.git
9+
url = https://github.com/nfarina/calloutview.git

MapView/Map/RMMapView.m

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,10 +1601,11 @@ - (void)observeValueForKeyPath:(NSString *)aKeyPath ofObject:(id)anObject change
16011601
//
16021602
_currentCallout.delegate = nil;
16031603

1604+
_currentCallout.permittedArrowDirection = SMCalloutArrowDirectionDown;
1605+
16041606
[_currentCallout presentCalloutFromRect:_currentAnnotation.layer.bounds
16051607
inLayer:_currentAnnotation.layer
16061608
constrainedToLayer:self.layer
1607-
permittedArrowDirections:SMCalloutArrowDirectionDown
16081609
animated:NO];
16091610

16101611
_currentCallout.delegate = self;
@@ -1902,10 +1903,7 @@ - (void)selectAnnotation:(RMAnnotation *)anAnnotation animated:(BOOL)animated
19021903

19031904
if (anAnnotation.layer.canShowCallout && anAnnotation.title)
19041905
{
1905-
_currentCallout = [SMCalloutView new];
1906-
1907-
if (RMPreVersion7)
1908-
_currentCallout.backgroundView = [SMCalloutBackgroundView systemBackgroundView];
1906+
_currentCallout = [SMCalloutView platformCalloutView];
19091907

19101908
if (RMPostVersion7)
19111909
_currentCallout.tintColor = self.tintColor;
@@ -1933,10 +1931,11 @@ - (void)selectAnnotation:(RMAnnotation *)anAnnotation animated:(BOOL)animated
19331931

19341932
_currentCallout.delegate = self;
19351933

1934+
_currentCallout.permittedArrowDirection = SMCalloutArrowDirectionDown;
1935+
19361936
[_currentCallout presentCalloutFromRect:anAnnotation.layer.bounds
19371937
inLayer:anAnnotation.layer
19381938
constrainedToLayer:self.layer
1939-
permittedArrowDirections:SMCalloutArrowDirectionDown
19401939
animated:animated];
19411940
}
19421941

MapView/MapView.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@
114114
DD41960116250ED40049E6BA /* RMTileCacheDownloadOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = DD4195FF16250ED40049E6BA /* RMTileCacheDownloadOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
115115
DD41960216250ED40049E6BA /* RMTileCacheDownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = DD41960016250ED40049E6BA /* RMTileCacheDownloadOperation.m */; };
116116
DD4BE198161CE296003EF677 /* Mapbox.h in Headers */ = {isa = PBXBuildFile; fileRef = DD4BE197161CE296003EF677 /* Mapbox.h */; settings = {ATTRIBUTES = (Public, ); }; };
117+
DD5F5F9518C7C03C0085DE98 /* SMClassicCalloutView.h in Headers */ = {isa = PBXBuildFile; fileRef = DD5F5F9318C7C03C0085DE98 /* SMClassicCalloutView.h */; };
118+
DD5F5F9618C7C03C0085DE98 /* SMClassicCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD5F5F9418C7C03C0085DE98 /* SMClassicCalloutView.m */; };
117119
DD5FA1EB15E2B020004EB6C5 /* RMLoadingTileView.h in Headers */ = {isa = PBXBuildFile; fileRef = DD5FA1E915E2B020004EB6C5 /* RMLoadingTileView.h */; settings = {ATTRIBUTES = (Private, ); }; };
118120
DD5FA1EC15E2B020004EB6C5 /* RMLoadingTileView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD5FA1EA15E2B020004EB6C5 /* RMLoadingTileView.m */; };
119121
DD63176317D15EB5008CA79B /* RMCircleAnnotation.h in Headers */ = {isa = PBXBuildFile; fileRef = DD63176117D15EB5008CA79B /* RMCircleAnnotation.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -293,6 +295,8 @@
293295
DD4195FF16250ED40049E6BA /* RMTileCacheDownloadOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMTileCacheDownloadOperation.h; sourceTree = "<group>"; };
294296
DD41960016250ED40049E6BA /* RMTileCacheDownloadOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMTileCacheDownloadOperation.m; sourceTree = "<group>"; };
295297
DD4BE197161CE296003EF677 /* Mapbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mapbox.h; sourceTree = "<group>"; };
298+
DD5F5F9318C7C03C0085DE98 /* SMClassicCalloutView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SMClassicCalloutView.h; path = SMCalloutView/SMClassicCalloutView.h; sourceTree = "<group>"; };
299+
DD5F5F9418C7C03C0085DE98 /* SMClassicCalloutView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SMClassicCalloutView.m; path = SMCalloutView/SMClassicCalloutView.m; sourceTree = "<group>"; };
296300
DD5FA1E915E2B020004EB6C5 /* RMLoadingTileView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMLoadingTileView.h; sourceTree = "<group>"; };
297301
DD5FA1EA15E2B020004EB6C5 /* RMLoadingTileView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMLoadingTileView.m; sourceTree = "<group>"; };
298302
DD63176117D15EB5008CA79B /* RMCircleAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMCircleAnnotation.h; sourceTree = "<group>"; };
@@ -605,6 +609,8 @@
605609
children = (
606610
DD1E3C6C161F954F004FC649 /* SMCalloutView.h */,
607611
DD1E3C6D161F954F004FC649 /* SMCalloutView.m */,
612+
DD5F5F9318C7C03C0085DE98 /* SMClassicCalloutView.h */,
613+
DD5F5F9418C7C03C0085DE98 /* SMClassicCalloutView.m */,
608614
);
609615
name = SMCallout;
610616
path = Map;
@@ -763,6 +769,7 @@
763769
23A0AAEB0EB90AA6003A4521 /* RMFoundation.h in Headers */,
764770
96492C400FA8AD3400EBA6D2 /* RMGlobalConstants.h in Headers */,
765771
B1EB26C610B5D8E6009F8658 /* RMNotifications.h in Headers */,
772+
DD5F5F9518C7C03C0085DE98 /* SMClassicCalloutView.h in Headers */,
766773
D1437B37122869E400888DAE /* RMDBMapSource.h in Headers */,
767774
1606C9FE13D86BA400547581 /* RMOpenCycleMapSource.h in Headers */,
768775
16FAB66413E03D55002F4E1C /* RMQuadTree.h in Headers */,
@@ -919,6 +926,7 @@
919926
B8C9746C0E8A1A50007D16AD /* RMMapView.m in Sources */,
920927
B8F3FC610EA2B382004D8F85 /* RMMapLayer.m in Sources */,
921928
B8F3FC650EA2E792004D8F85 /* RMMarker.m in Sources */,
929+
DD5F5F9618C7C03C0085DE98 /* SMClassicCalloutView.m in Sources */,
922930
B8474BA50EB40094006A0BC1 /* RMDatabaseCache.m in Sources */,
923931
126693040EB76C0B00E002D5 /* RMConfiguration.m in Sources */,
924932
23A0AAE90EB90A99003A4521 /* RMFoundation.c in Sources */,

Mapbox.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ Pod::Spec.new do |m|
4646

4747
m.dependency 'FMDB', '2.0'
4848
m.dependency 'GRMustache', '6.8.3'
49-
m.dependency 'SMCalloutView', '1.1'
49+
m.dependency 'SMCalloutView', '2.0'
5050

5151
end

0 commit comments

Comments
 (0)