uipagecontrol

Custom UIPageControl with dot images

筅森魡賤 提交于 2019-11-27 21:56:39
问题 When I needed to custom my UIPageControl I used this and this solution. Slightly modifying it for the new version of swift we have : class myPageControl: UIPageControl { var activeImage: UIImage! var inactiveImage: UIImage! required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) activeImage = UIImage(named: "active.png")! inactiveImage = UIImage(named: "inactive.png")! } func updateDots() { for i in 0 ..< self.subviews.count { let dot : UIImageView = imageViewForSubview(self

Hide dots from UIPageViewController

蹲街弑〆低调 提交于 2019-11-27 18:40: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; [[self.pageController view] setFrame:[self.view bounds]]; BSItemPageViewController *initialViewController =

How to put the UIPageControl element on top of the sliding pages within a UIPageViewController?

…衆ロ難τιáo~ 提交于 2019-11-27 11:11:22
Regarding to this tutorial by AppCoda about how to implement a app with UIPageViewController I'd like to use a custom page control element on top of the pages instead of at the bottom. When I just put a page control element on top of the single views which will be displayed, the logical result is that the control elements scrolls with the page view away from the screen. How is it possible to put the control element on top of the views so the page views are full screen (like with an image) so the user can see the views underneath the fixed control element? I attached an example screenshot -

How to change UIPageControl dots [duplicate]

主宰稳场 提交于 2019-11-27 05:45:51
问题 This question already has answers here : How can I change the color of pagination dots of UIPageControl? (18 answers) Is there a way to change page indicator dots color (10 answers) Closed 6 years ago . I've seen apps (e.g. meebo) that have different indicators on UIPageControls instead of the default white circles. is there an easy way to do this? I've read the docs for UIPageControls and it seems that there is no methods to replace the images. 回答1: You can achieve this by making the

Programmatically Linking UIPageControl to UIScrollView

你离开我真会死。 提交于 2019-11-27 00:03:49
问题 I am making a simple slideshow view within my app. I'd like to link my UIPageControl to my UIScrollView. This shouldn't be too difficult, but I haven't been able to find a simple solution anywhere. Below is my code. HelpViewController.h #import <UIKit/UIKit.h> @interface HelpViewController : UIViewController{ } @end HelpViewController.m #import "HelpViewController.h" @interface HelpViewController () @end @implementation HelpViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:

How to create a Scroll View with a page control using swift? [closed]

有些话、适合烂在心里 提交于 2019-11-26 21:30:46
I am trying to create a Page View controller with numbers of view. I want a simple code sample that will use UIPageViewController . LC 웃 import UIKit class DummyVC: UIViewController, UIScrollViewDelegate { let scrollView = UIScrollView(frame: CGRect(x:0, y:0, width:320,height: 300)) var colors:[UIColor] = [UIColor.red, UIColor.blue, UIColor.green, UIColor.yellow] var frame: CGRect = CGRect(x:0, y:0, width:0, height:0) var pageControl : UIPageControl = UIPageControl(frame: CGRect(x:50,y: 300, width:200, height:50)) override func viewDidLoad() { super.viewDidLoad() configurePageControl()

Is there a way to change page indicator dots color

风流意气都作罢 提交于 2019-11-26 17:16:05
I am newbie to iphone programming, I am trying to develop an app which uses page control. My view's background color is white and page controllers default one is also white, which makes page control invisible on my view so I have changed the back ground color of page control to make is visible. Now, the view appears patched and bad. Is there a way to change just the dots color for page control? Thanks in advance We customized the UIPageControl to use a custom image for the page indicator, I have listed the guts of the class below... GrayPageControl.h @interface GrayPageControl : UIPageControl

How can I change the color of pagination dots of UIPageControl?

[亡魂溺海] 提交于 2019-11-26 14:49:08
I am developing an application in which I want to change either color or image of UIPageControl pagination dots. How can I change it? Is it possible to customize UIpageControl on above scenario? UPDATE: This answer is 6 years old and very outdated, but it's still attracting votes and comments. Ever since iOS 6.0 you should be using the pageIndicatorTintColor and currentPageIndicatorTintColor properties on UIPageControl . ORIGINAL ANSWER: I ran into this problem today and decided to write my own simple replacement class. It's a sublassed UIView that uses Core Graphics to render the dots in the

How to create a Scroll View with a page control using swift? [closed]

此生再无相见时 提交于 2019-11-26 07:20:30
问题 I am trying to create a Page View controller with numbers of view. I want a simple code sample that will use UIPageViewController . 回答1: import UIKit class DummyVC: UIViewController, UIScrollViewDelegate { let scrollView = UIScrollView(frame: CGRect(x:0, y:0, width:320,height: 300)) var colors:[UIColor] = [UIColor.red, UIColor.blue, UIColor.green, UIColor.yellow] var frame: CGRect = CGRect(x:0, y:0, width:0, height:0) var pageControl : UIPageControl = UIPageControl(frame: CGRect(x:50,y: 300,

Is there a way to change page indicator dots color

北城余情 提交于 2019-11-26 05:19:32
问题 I am newbie to iphone programming, I am trying to develop an app which uses page control. My view\'s background color is white and page controllers default one is also white, which makes page control invisible on my view so I have changed the back ground color of page control to make is visible. Now, the view appears patched and bad. Is there a way to change just the dots color for page control? Thanks in advance 回答1: We customized the UIPageControl to use a custom image for the page