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.
Related
I am a beginner in developing iOS applications. Working in an application, where I am making all views programmatically.
I want to display a Map along with different bottom views. When first time the view is loaded, it displays Map along with first bottom view. When user performs an action, it displays the second bottom view but with the same Map View.
So in a nutshell I need to keep the same Map view but display several bottom view based on user action. I am looking for a better way to display bottom view based on user action and if user click on back button, it should return to last-displayed bottom view.
I tried to apply NavigationController on the bottom view controller (which is a child controller to Map View Controller) but it displays the child view in the entire windows instead of displaying in the bottom.
I also thought of registering bottom views to an event and show/hide bottom view based on what kind of event occurred. But here I also want to keep track of last event so when user clicks on back button it should display the last view. As this is very initial state so don't know if it's a good idea or not.
use a collection view with paging enabled and width of each cell equal to the screen width and scroll to next cell based on user action.
I am trying to create a two ViewController solution where a modal view controller is presented over a UICollectionView while allowing the user to interact with the CollectionView. In this case, it is like an advanced picker, allowing the user to choose items that will populate the properties in the modal view before saving a record.
I have a presentation controller setup to present the view how and where I want, allowing full visibility to the parent view. Nothing I have tried will allow the user to interact with (scroll, tap, etc) the UIController view.
In view debugging, I see a UITransitionView that has a frame equal to the full screen. (see image) I suspect that this is the culprit. Is this even possible in iOS?
The whole point of a modal view controller is that it takes over the screen and demands that the user respond to it before doing anything else. It puts your program into a "mode" that must be dismissed before the user can go on. That is the core reason for being of a modal dialog.
If you can interact with the view controller underneath the the top view controller is no longer a modal.
What you are trying to do is wrong from a human interface standpoint, and not supported by the application framework. You need to rethink your design.
Edit:
Top-level view controllers are not designed to share the screen. If you want another view controller to cover part of the screen while the user can still interact with the view controller underneath then you should use a container view as #МаксудДаудов suggests in his answer.
I would probably put a container view on top of the rest of my view controller's content, control-drag an embed segue to the child view controller I want to display, add an outlet to the container view, and then hide the container view.
When you want to display the "picker", you could then un-hide the container view, which would reveal the child view inside and let the user interact with it, while still being able to interact with the other components in your main view controller.
There is no way allowing presented full screen view controller to interact view controller under that. Instead , add your second view controller at containercontroller at some part of first, and change first VCs collection view frame accordingly, to be able see all the list. Doing this, you will have two view controllers working together
I am trying to create the ability to swipe down to access the next view controller or in other words I want to pull down the view controller from the top. I created a sample of how i want it to look and work using a scrollview. The problem when trying to use that method however was that I am no longer able to interact with the first view because the scrollview is covering it.
I want the top view to cover the bottom one when it is pulled in. I also want it to be in sync with the users finger, the same way the scroll view with paging enabled does in my gif example.
In my application I have a main view vontroller which has another view controller, flipsideViewController, behind it. Upon pressing a button in the main view, it curls up and the user has access to the other view behind it.
Within the flipside view, there is a button which is supposed to switch the view to a third view controller. However, the third view comes up behind the main view and it is supposed take up the entire screen.
A Page curl is not ment to show the entire screen, it is only ment for half or 3/4 of the screen, like in the Maps.app. If you are looking to change it, i suggest using the "Flip Horizontal" animation in this case.
Pretty new to iOS development and curious whether something is possible and if so the best want to do it.
I'd like to make a UIPageViewController be a portion of the screen. I.e., I want to have a menu bar, perhaps some additional controls and then place the page view controller on a portion of that page (so the menu bar isn't part of the page turning control). In other words, a UIPageView that acts like a scrollView that doesn't take up the whole screen.
Acceptable design?
Thanks.
Yes, this is possible, and the implementation is very easy.
Steps (implemented in XCode 6 using Storyboards)
Begin with an empty view controller.
Add a Container View from the object library on the right. The Container View may automatically embed in a regular View Controller, in which case you can just delete the View Controller because we want to embed a Page View Controller.
Select a Page View Controller from the object library on the right, and place it wherever you want in your Storyboard.
Ctrl Click + drag from the Container View to the Page View Controller, and select embed from the menu that appears. The Page View Controller should automatically resize itself to be the same size as the Container View in the original View Controller.
A nice example from apple developer sample code: PageControl. Implemented with UIScrollView and UIPageControl.
Also you may want to create a new iOS project with template "Page-Based Application". The template code is implemented with UIPageViewController.
Both implementation employ View Controller Containment.
BTW: the is no UIPageView, only UIPageControl or UIPageViewController.
You can Try Below link for uipageviewcontroller Tutorial
http://www.techotopia.com/index.php/An_Example_iOS_5_iPhone_UIPageViewController_Application
U can Try uiview for pageturning not uiviewcontroller
u can add uiview to uiviewcontroller.
like [Self.view addSubview:youruiview];
and Remove uiview controller like [youruiview removefromsuperview];
Thanks..!