我使用了我的项目第三方应用程序SWReavelViewController
。但我可以调整我的侧边栏宽度。这是否可以调整宽度。
答案 0 :(得分:0)
最好的方法是:
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
,根据你的要求改变价值。
您可以根据自己的要求进行自定义。
谢谢:)