IB inspectable for allowing tilt

This commit is contained in:
Minh Nguyễn
2015-10-22 15:01:36 -07:00
parent 28113d92e7
commit 1e9cf71b5a
2 changed files with 6 additions and 5 deletions

View File

@@ -34,6 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic) IBInspectable BOOL allowsZooming;
@property (nonatomic) IBInspectable BOOL allowsScrolling;
@property (nonatomic) IBInspectable BOOL allowsRotating;
@property (nonatomic) IBInspectable BOOL allowsTilting;
@property (nonatomic) IBInspectable BOOL showsUserLocation;
@end

View File

@@ -1535,7 +1535,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingPitchEnabled
{
return [NSSet setWithObject:@"allowsPitching"];
return [NSSet setWithObject:@"allowsTilting"];
}
- (void)setDebugActive:(BOOL)debugActive
@@ -3410,19 +3410,19 @@ class MBGLView : public mbgl::View
self.rotateEnabled = allowsRotating;
}
+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingAllowsPitching
+ (NS_SET_OF(NSString *) *)keyPathsForValuesAffectingAllowsTilting
{
return [NSSet setWithObject:@"pitchEnabled"];
}
- (BOOL)allowsPitching
- (BOOL)allowsTilting
{
return self.pitchEnabled;
}
- (void)setAllowsPitching:(BOOL)allowsPitching
- (void)setAllowsTilting:(BOOL)allowsTilting
{
self.pitchEnabled = allowsPitching;
self.pitchEnabled = allowsTilting;
}
- (void)didReceiveMemoryWarning