本文介绍了如何使用SWRevealViewController显示已调整大小的侧边栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在IOS app(通用)中使用SWRevealViewController。我在iPhone和iPad上都有侧边栏,但我想显示侧边栏,它覆盖了90%的屏幕 - 我怎么能?
I am using SWRevealViewController in IOS app (universal). I'm getting sidebar in iPhone and iPad both but I want to show sidebar which covers 90% of screen - how can I?
推荐答案
打开 SWRevealViewController.m
文件,然后你得到 _initDefaultProperties
方法。在这种方法中,你得到侧屏尺寸和位置
open the SWRevealViewController.m
file and then u get the _initDefaultProperties
Method. in this method you get the side screen size and position
- (void)_initDefaultProperties
{
_frontViewPosition = FrontViewPositionLeft;
_rearViewPosition = FrontViewPositionLeft;
_rightViewPosition = FrontViewPositionLeft;
_rearViewRevealWidth = 260.0f; /// this is the method u 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.25;
_frontViewShadowRadius = 2.5f;
_frontViewShadowOffset = CGSizeMake(0.0f, 2.5f);
_frontViewShadowOpacity = 1.0f;
_userInteractionStore = YES;
_animationQueue = [NSMutableArray array];
_draggableBorderWidth = 0.0f;
}
这篇关于如何使用SWRevealViewController显示已调整大小的侧边栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!