uipageviewcontroller

UIPageViewController, instantiating ViewControllers with Storyboard ID, Objective-C

混江龙づ霸主 提交于 2019-12-12 01:46:34
问题 I am trying to implement UIPageViewController and I believe that I am in the last stage. At first the UIPageViewController only used one VC to scroll to a "different" page. Now i want it to scroll between different ViewControllers. This is the code i am using: - (void)viewDidLoad { [super viewDidLoad]; self.vcIdentifiers = @[@"PageContentViewController", @"PageContentViewController1"]; // Create page view controller self.pageViewController = [self.storyboard

UIPageViewController navigates to wrong page with Scroll transition style

我的未来我决定 提交于 2019-12-11 19:51:53
问题 My UIPageViewController was working fine in iOS 5. But when iOS 6 came along, I wanted to use the new scroll transition style (UIPageViewControllerTransitionStyleScroll) instead of the page curl style. This caused my UIPageViewController to break. It works fine except right after I've called setViewControllers:direction:animated:completion: . After that, the next time the user scrolls manually by one page, we get the wrong page. What's wrong here? 回答1: My workaround of this bug was to create

Implement PageViewController in TableViewController details

大憨熊 提交于 2019-12-11 19:39:35
问题 I created my project based on single view application. My application at first has FoodTableViewContoller --> Details: ItemViewController (Contain "Item" as model). I have an array named itemArray that contain all the items. I wish to implement pageViewController (or similar other function) that user can swipe right or left to browse the item in itemArray. I followed the tutorial here and further implement in my existing project but it ended up in an infinite loop (Never goes through D log

Swift 4 UIPageViewController not showing the correct views (as defined in an array in sequence

廉价感情. 提交于 2019-12-11 15:43:20
问题 I am trying to build a small quotes app. The quotes are in an object array. Some have an article which provides some more info about the quote. I am using 2 viewcontroller types. One has a text block for the article and the other one doesn't. the UIPageViewController class is set up to allow the user to swipe through the quotes. This is managed by the object array above. The code goes through the array and then, if there is a string on the .article var in the object, it shows one view. If the

UIPageViewController with only one content view controller

安稳与你 提交于 2019-12-11 14:41:08
问题 I have an app with webView and some JS-tricks to present text. Paging is implemented in JS and I just pass events from gestures to JS functions. But what I miss is animation. Know user just see another portion of text when he turns the page with swipe. So I decided to use UIPageViewController. I need a one controller to be shown and it will change it state during animation of turning. So the same one will be returned every time in -(UIViewController*) pageViewController:(UIPageViewController

How navigate back to a deleted PageViewController entry / change the PageViewController entry

一个人想着一个人 提交于 2019-12-11 12:07:48
问题 Situation: I want to navigate back from a list of data entries to my PageViewController. the before and previous functions work func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? { if ((viewController as! LocationViewController).mLocationIndex > 0){ let storyboard = UIStoryboard(name: "Main", bundle: nil) let vc = storyboard.instantiateViewControllerWithIdentifier("LocationViewController")

How much a UIScrollView has been scrolled inside a UIPageViewController?

醉酒当歌 提交于 2019-12-11 11:20:07
问题 I'm trying to figure out how much of the scroll view inside my UIPageViewController has been scrolled. I have the following code in the viewLoad that access the UIScrollView from UIPageViewController . for (UIView *view in self.pageViewController.view.subviews) { if ([view isKindOfClass:[UIScrollView class]]) { thisControl = (UIScrollView *)view; } } So once I have the UIScrollView, called thisControl I would like to print how much has been scrolled by doing something like this: NSLog (@

Hide counter dots of UIPageViewController on last page

廉价感情. 提交于 2019-12-11 11:00:52
问题 I'm making a first tour view with a PageViewController, showing the counter dots at the bottom of the view. How can I Hide the dots only in the last page ? and Adjust the height of the view to fit the full screen? My last page will be the log in view of my app. Thanks. 回答1: You can use UIPageControl and hide it when you reach at last page. You can detect last page view delegate methods. You can find if current page is last page in this delegate method - (void)pageViewController:

UIImage name from array keeps returning nil value.

人走茶凉 提交于 2019-12-11 10:49:11
问题 Setting up a page view inside of a container. Followed all instructions I could find (beginner). These two arrays are in the main view controller which have names of the images I want to populate the pages. self.shirtImage = NSArray(objects: "shirt1", "shirt2") self.pantsImage = NSArray(objects: "pants1", "pants2") Whenever I run the program, these two lines: self.todayShirt.image = UIImage(named: self.shirtName) self.todayPants.image = UIImage(named: self.pantsName) return the error fatal

How to create PageView with UITabBar or Segment Control using Swift?

*爱你&永不变心* 提交于 2019-12-11 07:28:28
问题 I am quite new in iOS. I have a problem and not able to get the exact idea for implementation. I am uploading two images here, so please suggest me how can I implement it using Swift. Here is my images: In Images you can see that for a single viewController there is two tabs one is "YOUR GROUP" and another one is "SHARED BY". In that I have a tableView also. I have created two custom UITableViewCells one for "YOUR GROUP" and another one for "SHARED BY". Actually basic idea I know that using