I have been trying to implement drag and drop between pages of UIPageViewController, like when you move your apps between the pages of your iPhone's home screen. The problem is that when I start dragging the view and switch to the next page, the view freezes and becomes undraggable. Do you have any idea how NOT to stop the touch event when switching between pages?
Related
I have a map in a UIPageViewController. This map has overlays in it. My setup has two pages. The left one is a UIViewController with a map in it and the right one is a UICollectionViewController.
The app opens on the right view.
The issue is that when I swipe to open the left view, the app freezes for one to two seconds and then opens the map view controller. This is a problem.
How can I get the UI to remain responsive when opening the map for the first time?
I have created a UIPercentDriven Transition which modally presents a popover view containing a tableView. Then, following stack exchange posts such as this one: In iOS, how to drag down to dismiss a modal?, I added a panGestureRecognizer to control the dismissal of the modal view. Then, I attempted to add functionality so that the user can continue to swipe downward once the tableview has reached the top to trigger the percent driven transition.
Here is a link to the project on github:https://github.com/KaplanAlex/modalViewDismissal
This transition was based on moving the frame of the modal view off of the screen. I also created the transition by using snapshots (which is commented out in the github project) and have the same issues. For some reason, the interactive dismissal works well unless the user moves the modal view back up after starting the dismissal and then continues to swipe upward after the modal view has reached the top of the view, the entire application seems to freeze. It doesnt crash, but also doesnt respond to taps anywhere on the screen. Even cancel button cannot be pressed. Has anyone encountered this issue before? Thanks for the help.
I'm interested if it is possible and if possible how to embed some kind of a page view control into a small view on a screen and react on taps on it.
Use a container view. Container views allow for page views and scroll views alike to be nested like a normal UIView which you can place within other views. As far as tapping to switch pages, use a touchesBegan function to call the next page.
I have a UIWebView that imports a single page web app (ex. AngularJS app). When I navigate inside the webview, I want to make the user feel as if he's navigating inside a native app. To do this, I need to be able to programmatically change the navigation bar (title and the back button) and imitate page transition inside the app. The page transition can be done by using ionic, which uses hardware acceleration along with velocity.js but I am not sure if animating the fade in and sliding effect of navigation title would be easy enough.
Is there a way to programatically animate the navigation bar, as if you're moving away to a different view?
I have implemented horizontal swipe of UIViewcontrollers using UIPageViewController. It works fine as app launches, but if we navigate to any view controller by using button or any other element from any of the other viewControllers, the horizontal swipe will not work.What should I do?
If you are in PageViewController and present another view using a button, how are you presenting it? modally?, if so, then you are "out" of the PageViewController, and your swipes are not going to work.
If you are "jumping" to another viewController in the UIPageViewController, you will have to provide information about the previous and next page for the swipes to work, check this other post for more info: UIPageViewController, how do I correctly jump to a specific page without messing up the order specified by the data source?