I used my project third party application SWReavelViewController
. But i can adjust my Side bar width. Is this any possible to adjust the width.
Asked
Active
Viewed 290 times
0

Suraj Sukale
- 1,778
- 1
- 12
- 19
-
See my answer, you can customize it according to your requirement withour code – Suraj Sukale Jan 06 '17 at 07:19
1 Answers
1
The best way to do this is:
1. Open the SWRevealViewController.m
file and then you get the _initDefaultProperties
Method.
2. In this _initDefaultProperties
method looks like following:
- (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;
}
What you have to do- instead of _rearViewRevealWidth = 260.0f;
this line _rearViewRevealWidth = Your_value.0f
, change value according to your requirement.
You can customize it according to your requirement.
Thank you :)

Suraj Sukale
- 1,778
- 1
- 12
- 19