ModalViewController frame moving - ios

I'm not sure if I can do this in this way, but let's have a try with smarter people then me.
I want to be able to move the frame of presented controller by dragging it. I'm expecting to see controller in which I've invoked the [self presentModalViewController:anotherVC animated:YES]; below the presented one. I'm seeing white background thou.
In order to achive this functionality without presenting modal view controller I could add subview i.e.:
[self.view addSubview:anotherVC.view];
But is there a way to move modal presented view controller and be able to see view from which this modal controller is presented in?

If you need to display the parent view behind the modal view, then you can use this code:
Set your anotherVC.view.frame less than your parent view.
anotherVC.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:anotherVC animated:YES];
But the visible portion of the parent view will be dimmed for preventing the interaction.
UIModalPresentationFormSheet
The width and height of the presented view are smaller than those of the screen and the view is centered onscreen. If the device is in a
landscape orientation and the keyboard is visible, the position of the
view is adjusted upward so the view remains visible. All uncovered
areas are dimmed to prevent the user from interacting with them.
Modal Presentation Styles

Related

Changing frame of presented navigation view controller from custom UIPresentation Controller not changing bounds of navigation controller childrens

I am presenting a navigation controller with custom transition and custom presentation controller. Presentation controller listen for keyboard, and change presented view controller frame accordingly.
In first screen keyboard is active so presented view controller use smaller frame
I have set red background for navigation controller. When 2nd screen comes it dismiss keyboard, and the frame of presented view controller is increased. Although navigation controller frame changes as require it doesn't change frame for its children views
Any idea how can i fix this issue

Rotating a VC presented as UIModalPresentationOverCurrentContext

iOS 8. I am presenting a view controller with presentation style: UIModalPresentationOverCurrentContext. This works great until I rotate my device, at which time the presented view is not properly adjusted.
Example: I presented over a portrait context. Entire screen covered by my new view (which has semi-transparencies). I rotate to landscape. The presented view rotates, but is now centered and remains at portrait width.
Both the presenting VC and the presented view are created in a storyboard using autolayout. Since I can't add constraints to the topmost view in a VC (right?) I'm not sure how to keep my presented view entirely covering the view below it.
This can happen if Presentation in the Segue is set to Page Sheet. In the storyboard, change the presentation to Full Screen or Over Full Screen
Since you're not using a segue, use UIModalPresentationOverFullScreen.

Is there anyway to change the position and size of UIPopoverPresentationController?

I want to use UIPopoverPresentationController. I have view controller which will be displayed in popover controller. However, I want to dismiss current popover and recreate and present again continuously.This implementation will cause the screen blinking. So If there is anyway to change the position and size of UIPopoverPresentationController ?

Change the size of pushed viewcontroller

I'm presenting a ViewController which has UINavigationController. Is it possible to change the size of whole NavigationViewController just like when showing UINavigationViewController in UIPopOver and the size can be handled with setContentSizeInPopOver. Right now I'm not using UIPopover but I want to change the size of pushed view controller. Setting the frame of UINavigationController of pushed controller in viewDidload isn't helping.
For changing the size of view controller that is to be presented u could use this one
How to present a modal view controller with custom size in center?
Not tested.
Try changing the frame of the view controller view's superview to desired frame just before presenting the navigation controller. Remove all the auto re-sizing masks of the view.

Flipboard ipad app: right menu panel slide effect

how to implement right panel slide effect like following picture? when click left area, the right panel is hidden.
picture url http://cdn.thenextweb.com/wp-content/blogs.dir/1/files/2012/02/photo.png
I think
it is not popover controller.
is it a view added by using "addSubview"? I don't think so because it is a navigation controller,it seems that view in navigation controller can't be added by using addsubview
is it a modal view? if yes, how to implement semi transparent background? if use UIModalPresentationCurrentContext to present modal view, parent view can't rotate when ipad is rotated.
Any help is highly appreciated! Thanks.
These are all likely highly customized view controllers, and view controller containers.
You can fully control the presentation of your view controllers by adding them as children of another view controller, and adding their views to the view tree manually -- using any animation you choose.
The dimming effect you see can be achieved by overlaying a "dimming view", for example a black 50% opaque view.

Resources