uipagecontrol

Creating a Vertical UIPageControl

天大地大妈咪最大 提交于 2019-12-20 19:38:46
问题 Anyone have an idea how to create a vertical UIPageControl? I have a UIScrollView with pagination enabled and I would like to have the UIPageControl sit on the side and appear vertically instead of horizontally. Thank you in advance... 回答1: You can apply a rotation transformation to the UIPageControl. pageControl.transform = CGAffineTransformMakeRotation(M_PI_2); Swift 3.0 let angle = CGFloat(M_PI_2) pageControl.transform = CGAffineTransform(rotationAngle: angle) Swift 4.0 let angle = CGFloat

How do I implement UIPageControl in Swift

徘徊边缘 提交于 2019-12-20 11:29:54
问题 Ok so I'm struggling here and haven't been able to find a working solution. I've been self learning Swift without Objective C experience (I know, I know). In my app, I have my main UIViewController , a subview that is transparent but slides in from the bottom of the screen, and then 4 subviews of the sliding subview that are all working UIScrollViews. I have paging enabled and it works great but I'd like to add a UIPageControl for each of them. I seriously can't grasp delegates and how to

How do I implement UIPageControl in Swift

天大地大妈咪最大 提交于 2019-12-20 11:29:22
问题 Ok so I'm struggling here and haven't been able to find a working solution. I've been self learning Swift without Objective C experience (I know, I know). In my app, I have my main UIViewController , a subview that is transparent but slides in from the bottom of the screen, and then 4 subviews of the sliding subview that are all working UIScrollViews. I have paging enabled and it works great but I'd like to add a UIPageControl for each of them. I seriously can't grasp delegates and how to

Scaling current dot of UIPageControl and keeping it centered

筅森魡賤 提交于 2019-12-20 04:25:20
问题 I've subclassed UIPageControl in order to have its current dot bigger. class CustomPageControl: UIPageControl { override var currentPage: Int { didSet { updateDots() } } func updateDots() { let currentDot = subviews[currentPage] let largeScaling = CGAffineTransform(scaleX: 3, y: 3) subviews.forEach { // apply the large scale of newly selected dot // restore the normal scale of previously selected dot $0.transform = $0 == currentDot ? largeScaling : .identity } } } But the result of the

Customise Position of UIPageControl

我是研究僧i 提交于 2019-12-19 09:55:12
问题 I am using project from github as a reference. project URL: https://github.com/lephuocdai/iOSsample/tree/master/PageViewDemo In this project i want to show the UIPageControl at top left position . I tried setting the rect property of pageControl using CGRectMake() to some value ;But it shows always at bottom center 回答1: here s a very neat and 100% effective way to get to change the position of the pageControl extension UIPageViewController { override open func viewDidLayoutSubviews() { super

UIScrollView and UIPageControl within UITableView

别说谁变了你拦得住时间么 提交于 2019-12-19 05:04:38
问题 I've seen lots of sources saying it is possible to include a UIScrollView with UIPageControl inside a UITableViewCell to be able to scroll horizontally (through a list of selectable images), but can't find any raw examples that does what I want. I've gotten my scroll view "working", but I am unsure how to go forward - hopefully someone can send me some guidance. Within my cellForRowAtIndexPath, I create a cell, and add both a scrollView and pageControl as subviews. UITableViewCell *cell =

Xcode: How do I change UIPageControl value with swipe gesture?

耗尽温柔 提交于 2019-12-19 03:15:38
问题 I have a quick question I was hoping you guys could help me answer. Right now I have a UIPageControl in a storyboard which changes an image depending on what dot you are on, however, as of now you have to press on the dot to change through the dots/images, how can I change through the images/dots by swiping? Here is my code for my .h #import <UIKit/UIKit.h> @interface PageViewController : UIViewController @property (strong, nonatomic) IBOutlet UIImageView *dssview; - (IBAction)changephoto:

Add border for dots in UIPageControl

会有一股神秘感。 提交于 2019-12-18 03:10:15
问题 I want to add border color for dots in UIPageControl. Here is the small picture of it: I am able to put second dot by configuring it from XCode but I cannot make the first and third circles' inside empty. Is there a simple way to achieve that? Thanks :) 回答1: That is not possible with the current properties available for UIPageControl . But you can do by integrating any third party page control which mimic the functionality of iOS UIPageControl . Other answer has applied a patch. I highly

UIPageViewController setViewControllers, UIPageControl not showing right current number

陌路散爱 提交于 2019-12-17 21:29:32
问题 I'am using a UIPageViewController with horizontal scrolling... as long as the user scrolls, the UIPageControl works correctly, problem occurs when jumping programmatically to next or previous page [self.pageViewController setViewControllers:@[[self viewControllerWithIndex:index]] direction:UIPageViewControllerNavigationDirectionReverse animated:YES completion:nil]; Than the index of the UIPageControl isn't right (i would provide the index by myself, but cannot access the UIPageViewController

Hide dots from UIPageViewController

你离开我真会死。 提交于 2019-12-17 15:34:56
问题 I would like to do to a pretty simple thing. Just remove all the dots, and the bar on the bottom of the UIPageViewController. This is the setup: I have a custom view controller which has UIPageViewController *pageController I display it like this: self.pageController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil]; self.pageController.dataSource = self; [