Closed kyurkchyan closed 11 years ago
same question
Frame of side controller view resizes in controller.view.frame = [self getSideViewFrameFromRootFrame:rootFrame andDirection:direction alreadyFullScreenLayout:controller.wantsFullScreenLayout]; in method pushViewController:(UIViewController *)controller onDirection:(PPRevealSideDirection)direction ... When u call pushViewController or pushOldViewController on barbuttonitem tap resizing is nice, but not for opening by sliding. It happens because call pushOldViewControllerOnDirection -> controller.view.frame = ... occurs only when (panGesture.state == UIGestureRecognizerStateEnded || panGesture.state == UIGestureRecognizerStateCancelled) for method
So i think, if option PPRevealSideOptionsResizeSideView is enabled we should update side view size on pan gesture state began.
So far, I see that if I enable the resize views, I have this glitch. But if I remove it, then I don't have the glitch, but yes the subviews do not resize and have the full screen width instead of the width - the offset I will look into it
Thanks for the reply Is it possible to set the width of the controller that is going to be left side of the PPRevealController before preloading it, because my left side will be always the same width, so I don't need the resizing feature? I do this but the my settings are not effected.
for example: in ECSlidingViewController https://github.com/edgecase/ECSlidingViewController when recognizer.state == UIGestureRecognizerStateChanged depending of new center position for topview controller we send [self underLeftWillAppear]; -> [self updateUnderLeftLayout]; - resizing
Yes, but I had the same conclusion as you: I should resize the view on pan gesture began except that this method (getSideViewFrame...
) has not been designed to be called here because it resized according to rootViewController frame. So I need to rewrite a new method, not sure I have time right now
The problem doesn't seem to be fixed for me. The view doesn't resize herself correctly while I'm panning.
It is not, I closed this as a won't fix right now, I don't have time to do that and this brings some big updates in the way I managed the frame. The best thing to do is not auto resizing the view or provide a pull request I think ;)
Hi All. Here is a workaround that I have used. Suppose you have YourSideViewController view controller for displaying as a left side of PPRevealSideViewController. You need just to fix the size of the main view of that controller. So create class named CustomView which inherits from UIView, and override these methods
After that simply set YourSideViewController main view class in identity inspector to CustomView. And everything will work.
I want to disable the resizing of the side view, however no matter I set PPRevealSideOptionsResizeSideView option or not, my given frame sizes are ignored. When I set the size of the side view controller and after that preload it, PPRevealSideViewController somehow ignores my settings. Here is what happens. I set the size, and when I reveal side view, only after the side view is completely opened my side view is resized. After closing side view controller returns to size set inside PPRevealSideViewController code. To demonstrate this see screenshots. First is during opening, second when the controller is opened. During opening center button is large, so only a part of it is seen, after opening side view is automatically resized to fit the space, which es determined by the offset property of side view.
How can I make the side view to have fixed width, no matter what happens? Because this resizing after opening causes the graphics to be redrawn and makes the side view interface some kind of jump after opening, which is not pleasant.
Thanks for help.