- Adds testDelegatesStartStopLocatingUser: Tests mapViewWillStartLocatingUser and mapViewDidStopLocatingUser delegate methods - Adds testUserTrackingModeFollow - Adds testUserTrackingModeFollowWithHeading (disabled because of library bug) Fakes user location via swizzled CLLocationManager and hard-coded mock coordinates and heading.
23 lines
572 B
Objective-C
23 lines
572 B
Objective-C
//
|
|
// Based on gist by Eric Allam
|
|
// https://gist.github.com/ericallam/5689235
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@interface CSSwizzler : NSObject
|
|
|
|
+ (void)swizzleClass:(id)cls
|
|
replaceClassMethod:(SEL)origMethodSelector
|
|
withMethod:(SEL)replacementMethodSelector;
|
|
|
|
+ (void)swizzleClass:(id)cls
|
|
replaceMethod:(SEL)origMethodSelector
|
|
withMethod:(SEL)replacementMethodSelector;
|
|
|
|
+ (void)swizzleClassOfInstance:(id)inst
|
|
replaceMethod:(SEL)origMethodSelector
|
|
withMethod:(SEL)replacementMethodSelector;
|
|
|
|
@end
|