uipageviewcontroller

Using Page View Controller inside Tab Swift

非 Y 不嫁゛ 提交于 2019-12-08 09:41:51
问题 MY WORK SO FAR: So I have a Tab bar that looks like this: When I click on "Canteen" I want to be directed to a Page View Controller where I can swipe between different pages but stay on the same tab. I have this somewhat working: I have the Storyboard setup like this: As you can see that segue above is coming from the Tab Bar Controller. The third view (Can Page Item Controller, ID: "CanItemController) is used for all pages in the page view. The second view above (Page View Controller, ID:

UIPageViewController changes size?

柔情痞子 提交于 2019-12-08 02:12:13
问题 I'm using the Page-Based Application template in Xcode 4 to load pages of a PDF and create a UITextView over hidden text boxes so the user can write notes. So far I have it all working, but when I add the UITextView, it's in the wrong place in landscape mode (showing 2 pages). // ModelController.m - (id)init { self = [super init]; if (self) { NSString *pathToPdfDoc = [[NSBundle mainBundle] pathForResource:@"My PDF File" ofType:@"pdf"]; NSURL *pdfUrl = [NSURL fileURLWithPath:pathToPdfDoc];

How do I change the UIPageViewController from WITHIN one of the UIViewControllers that is part of the UIPageViewController?

99封情书 提交于 2019-12-08 01:18:21
问题 I have been trying to figure this out for hours, and I must be misunderstanding how UIPageViewController works. I have 5 setup screens (separate view controllers that are loaded into the UIPageViewController ) that I can swipe right + left to see. BUT! I want to be able to programmatically show the next view controller in line after they dismiss an alert on one of those view controllers. And so far, the only solution that I've found that gets close, is this solution here ( https://github.com

Implementing UIPageViewController's logic as a subview to a UIViewController in Swift

孤街醉人 提交于 2019-12-07 21:50:33
问题 I have to implement a UIPageViewController as a subview to my UIViewController. The UIPageViewController has some logic and other ViewControllers inside. My question is how to connect these two pieces of code below. So this is my main UIViewController code: class MyMainViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } } and my UIPageViewController code, which implements an endless

UITableView embedded in UIPageViewController (ScrollStyle) cannot be tapped - didSelectRowAtIndexPath not fired

二次信任 提交于 2019-12-07 17:49:41
问题 My architecture of viewcontrollers are: mainViewController(full-screen) | V pageViewController(part-of-screen) | | V V tableViewController1 tableViewController2 Unlike most of existing posts, the UIPageViewController is set to style: UIPageViewControllerTransitionStyleScroll , which means that pageVC.gestureRecognizers is empty, and I can NOT find the tapGuesture to disable. I've searched the site for a whole afternoon, and find NO solution (most answers are related to the pageCurlStyle).

PageViewController showing a black screen

*爱你&永不变心* 提交于 2019-12-07 17:31:50
问题 In storyboard I have a UIPageViewController and this is my code class ReservedTimesViewController: UIPageViewController { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } } extension ReservedTimesViewController: UIPageViewControllerDataSource { func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? { let controller =

iOS - UIPageViewController 'Failed to determine navigation direction'

风格不统一 提交于 2019-12-07 14:16:39
问题 I have UIPageViewController with one of its view controllers being a UITableViewController . Each UITableViewCell can collapse/expand to hide/show a nested table view. Whether or not any cells are expanded, I get this error sometimes when I scroll up and down in the UITableView : 2015-08-12 20:11:15.184 MyApp[4506:172368] *** Assertion failure in -[_UIQueuingScrollView _didEndDraggingManualScroll], /SourceCache/UIKit_Sim/UIKit-3347.44.2/_UIQueuingScrollView.m:861 2015-08-12 20:11:15.261 MyApp

UIPageViewControllerDatasource calling both swipe left and swipe right methods

拥有回忆 提交于 2019-12-07 11:11:10
问题 If viewControllerBeforeViewController viewControllerAfterViewController either of the method returns nil the counter part is also called. Is this behaviour expected behaviour ? Any way i can stop this from happening. This is what I am tried to do . - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController { if ([viewController isKindOfClass:[QuestionViewController class]]){ QuestionViewController*

Disable UIPageViewController Swipe - Swift

丶灬走出姿态 提交于 2019-12-07 08:38:40
问题 In my project i use UIPageViewController to swipe between 5 child UIViewController. In some of child view controller, i need to disable the swipe gesture of the UIPageViewController so when user swipe it not change to other view. So how i can disable the swipe from the child view controller? Appreciate for help..thanks 回答1: In your page view controller, add following override func viewDidLoad(){ super.viewDidLoad() NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector

UIPageViewController and removing current view controller

笑着哭i 提交于 2019-12-07 05:23:40
问题 I setup UIPageViewController to forward and backward through some view controllers . I have a problem which is when a view controller adds to UIPageViewController the memory usage will increase until the compiler gives me Received memory warning and then app runs too slowly until the app empties the memory and works fine again . How can I navigate through view controllers without increasing memory ? or better to say how can remove current view controller when a new on adds . here is my code :