uipagecontrol

iOS - UIPageControl page indicator dots not changing with UISwipeGestureRecognizer

风流意气都作罢 提交于 2019-12-11 12:09:03
问题 I am using UIPageControl and UISwipeGestureRecognizer to switch between 2 view controllers of my application. I have modified this tutorial without using scroll view. I have 2 issues: 1) Using the swipe gesture is changing the view controllers/pages but not the dots indicating the current page. I have tried if (self.pageControl.currentPage == 0) { self.pageControl.currentPage = 1 } but I am not sure why it does not work. I have the outlet available @property (strong, nonatomic) IBOutlet

customize UIPageControl dots

不羁的心 提交于 2019-12-11 07:01:16
问题 I'm currently trying to customize the UIPageControl so it will fit my needs. However I seem to be having a problem when implementing some logic in the draw What I want to do is to be able to user IBInspectable variables to draw out the UIPageControl however those seem to still be nil when the draw method is being called and when I try to implement my logic in the awakeFromNib for instance it won't work. What I did so far is the following class BoardingPager: UIPageControl { @IBInspectable var

Reliable way to track Page Index in a UIPageViewController - Swift

倖福魔咒の 提交于 2019-12-11 05:42:34
问题 I have a UIPageViewController (custom one) inside a Container located in a regular UIViewController. i need to be able to call an event with each Page Change but ONLY if it really did change and not only half way or anything of that sort. using: func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? is unreliable and not called each time for some reason. if your answer contains anything about

iOS Paging Controls (Navigation)

一曲冷凌霜 提交于 2019-12-10 19:22:41
问题 Is there a way that I can use those paging dots independently in my app, add them to my UIView/NIB and call the functions on it to set total number of dots or current page/dot. Basically I've UIViewImage in a nib file, i'm displaying images (names taken off an array) on swipe gestures and want to show those paging dots on the bottom for the navigation information. 回答1: UIPageControl has it's total page & current page/dot just as you described, let's say pageControl is a instance of

UIPageControl and UIPageviewController are out of sync

流过昼夜 提交于 2019-12-10 17:14:10
问题 I have a UIPageViewController that shows 7 pages. I've noticed this weird issue: Whenever you swipe the page controller and tap the Uipagecontrol, which is at the bottom, in the opposite direction of the swipe at the same time the page that is currently being displayed and the page number in the pagecontrol will be out of sync. Does anyone have this weird issue and solved it. Please help me. Please let me know if you need any additional info. 来源: https://stackoverflow.com/questions/21891756

UIPageControl + UIAppearance

巧了我就是萌 提交于 2019-12-10 09:34:39
问题 The docs for UIAppearance is extremely poor. I want to customize the colours for a UIPageController, but I am unable to figure out which properties to set. When I go [UIPagecontrol appearance] set I get probably hundreds of options, so it's nearly impossible to figure out what's what. I would assume it's possible with UIAppearance proxy, right? Thank you 回答1: UIAppearance protocol was added to UIPageControl as of iOS 6. The properties you can customise are: Dot tint colour Highlighted dot

UIPageControl is not Displayed

≡放荡痞女 提交于 2019-12-08 15:00:23
问题 I use the following to display scrollview and pagecontrol scrollView=[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 179)]; pageControl=[[UIPageControl alloc] initWithFrame:CGRectMake(0, 179, 320, 20)]; scrollView.delegate = self; [scrollView setBackgroundColor:[UIColor blackColor]]; [scrollView setCanCancelContentTouches:NO]; scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite; scrollView.clipsToBounds = YES; scrollView.scrollEnabled = YES; scrollView.pagingEnabled = YES;

ScrollView: PageControl dot doesnt change with the page

眉间皱痕 提交于 2019-12-08 07:44:25
问题 I've written an iPhone App with a TableView and a detailView which contains a ScrollView with 2 pages (both containing an image) and a pageControl displaying 2 white dots. It al seems to work perfect. The view scrolls to the left and show the next page (just as it should) Except for the little white dots (PageControl dots) that are under the scrollView. If I press the little dots: the page scrolls and the second dot becomes highlighted (perfect!). But if I slide the first page (manualy with

UIScrollView and PageControl: space between views

旧城冷巷雨未停 提交于 2019-12-08 06:49:54
问题 Is it possible to add some black space between views that are shown by a UIScrollView and PageControl. Each of these views is a simple view controller with an UiImageView in it, similar to the photo album. I want to add the space, so when the users are switching "pages"/photos, there is some gap in between. scrollArea.pagingEnabled = YES; scrollArea.contentSize = CGSizeMake(scrollArea.frame.size.width * [photos count], scrollArea.frame.size.height); scrollArea.showsHorizontalScrollIndicator =

Subclassing UIPageControl

醉酒当歌 提交于 2019-12-08 04:49:56
问题 I have my images, but how do I redraw the UIPageControl to use these images? 回答1: The UIPageControl does not manage any views for you. It is a very basic control that just displays the dots. It is up to you to implement your 'page' views and navigate between them using 'swipe' gestures or however you want to do it. See this tutorial for information on how to combine a UIPageControl with two UIViews to navigate between multiple pages. (To directly address the title of your question - you do