How to show resized sidebar using SWRevealViewController?

前端 未结 4 1527
醉梦人生
醉梦人生 2021-01-05 11:59

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?

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-05 12:21

    open the SWRevealViewController.m file and then you get the _initDefaultProperties Method.

     - (void)_initDefaultProperties
    {
    
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
    
          float x=(appDelegate.windowWidth)*9/10; //windowWidth=self.window.bounds.size.width;
          float y=x-260;
    
        _frontViewPosition = FrontViewPositionLeft;
        _rearViewPosition = FrontViewPositionRightMost;
        _rightViewPosition = FrontViewPositionLeft;
        _rearViewRevealWidth = x;
        _rearViewRevealOverdraw = 60.0f+y;
        _rearViewRevealDisplacement = 40.0f+y;
    ....
    }
    

提交回复
热议问题