1

Clink to see image MY sw_rear

When running

Clink to see image Space is 1/3 of display

but i want set space is 5/6 of display

Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143

2 Answers2

1

you can change the width like use property of rearViewRevealWidth in SWL

// so the revealed frontView width is kept constant when bounds change as opposed to the rear or right width.

@property (nonatomic) CGFloat rearViewRevealWidth;

Objective-C

revealViewController.rearViewRevealWidth=self.view.frame.size.width-100.0f; //customize the width/space

Swift

revealViewController!.rearViewRevealWidth=self.view.frame.size.width-100 //customize the width/space
Community
  • 1
  • 1
Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143
0

The width is controlled by the rearViewRevealWidth on your SWRevealViewController.

For example:

revealViewController = SWRevealViewController(rearViewController: myRearViewController, 
                                              frontViewController: myFrontViewController)
revealViewController.rearViewRevealWidth = myWidth

where the width is a CGFloat.

From the documentation for the rearViewRevealWidth property:

Defines how much of the rear or right view is shown, default is 260. Negative values indicate that the reveal width should be computed by substracting the full front view width, so the revealed frontView width is kept constant when bounds change as opposed to the rear or right width.

Daniel Zhang
  • 5,778
  • 2
  • 23
  • 28
  • I dont understand, I set it like so: revealViewController().rearViewRevealWidth = self.view.frame.size.width-100 which is the same as if I do the following: revealViewController().rearViewRevealWidth = 145 nothing is different!? – Famic Tech Dec 19 '16 at 00:16