【发布时间】:2017-01-06 07:00:00
【问题描述】:
我使用了我的项目第三方应用程序SWReavelViewController。但我可以调整我的侧栏宽度。这是否可以调整宽度。
【问题讨论】:
-
看我的回答,您可以根据您的要求使用我们的代码自定义它
标签: objective-c swrevealviewcontroller
我使用了我的项目第三方应用程序SWReavelViewController。但我可以调整我的侧栏宽度。这是否可以调整宽度。
【问题讨论】:
标签: objective-c swrevealviewcontroller
最好的方法是:
1. 打开SWRevealViewController.m 文件,然后得到_initDefaultProperties 方法。
2. 在这个_initDefaultProperties 方法中如下所示:
- (void)_initDefaultProperties
{
_frontViewPosition = FrontViewPositionLeft;
_rearViewPosition = FrontViewPositionLeft;
_rightViewPosition = FrontViewPositionLeft;
_rearViewRevealWidth = 260.0f; // In this method you can change the side bar width
_rearViewRevealOverdraw = 60.0f;
_rearViewRevealDisplacement = 40.0f;
_rightViewRevealWidth = 260.0f;
_rightViewRevealOverdraw = 60.0f;
_rightViewRevealDisplacement = 40.0f;
_bounceBackOnOverdraw = YES;
_bounceBackOnLeftOverdraw = YES;
_stableDragOnOverdraw = NO;
_stableDragOnLeftOverdraw = NO;
_presentFrontViewHierarchically = NO;
_quickFlickVelocity = 250.0f;
_toggleAnimationDuration = 0.3;
_toggleAnimationType = SWRevealToggleAnimationTypeSpring;
_springDampingRatio = 1;
_replaceViewAnimationDuration = 0.25;
_frontViewShadowRadius = 2.5f;
_frontViewShadowOffset = CGSizeMake(0.0f, 2.5f);
_frontViewShadowOpacity = 1.0f;
_frontViewShadowColor = [UIColor blackColor];
_userInteractionStore = YES;
_animationQueue = [NSMutableArray array];
_draggableBorderWidth = 0.0f;
_clipsViewsToBounds = NO;
_extendsPointInsideHit = NO;
}
你必须做什么-而不是_rearViewRevealWidth = 260.0f;这一行_rearViewRevealWidth = Your_value.0f,根据你的要求改变值。
您可以根据自己的需要进行自定义。
谢谢你:)
【讨论】: