uipagecontrol

Vertically rotated UIPageControl taking too much space

冷暖自知 提交于 2021-02-11 12:21:46
问题 I used CGAffineTransform to rotate a horizontal UIPageControl vertical. But when I added it besides my collection view it's taking too much width. And when I add a width anchor on it, the UIPageControl disappears. noticesPagingIndicator = UIPageControl() let angle = CGFloat.pi/2 noticesPagingIndicator.transform = CGAffineTransform(rotationAngle: angle) NSLayoutConstraint.activate([ // noticesPagingIndicator.widthAnchor.constraint(equalToConstant: 30), noticesPagingIndicator.leadingAnchor

iOS UIPageControl(分页控制器) 用法总结

偶尔善良 提交于 2020-03-23 10:42:48
3 月,跳不动了?>>> UIPageControll 是继承于UIControl的一个IOS系统UI控件,可以提供给开发者设计分页效果的功能。 初始化方法 UIPageControl * page = [[UIPageControl alloc]initWithFrame:CGRectMake(100, 100, 100, 100)]; 设置控制器页数(默认为0) @property(nonatomic) NSInteger numberOfPages; 设置当前所在页码 @property(nonatomic) NSInteger currentPage; 设置当总页数为1时,是否自动隐藏控制器 @property(nonatomic) BOOL hidesForSinglePage; 设置是否延迟自动更新控制器的当前页码(默认为NO) @property(nonatomic) BOOL defersCurrentPageDisplay; 注意:这个属性如果设置为YES,点击时并不会改变控制器显示的当前页码点,必须手动调用 - ( void )updateCurrentPageDisplay; 这个方法,才会更新。 更新控制器当前页码 - (void)updateCurrentPageDisplay; 通过页数得到控制器大小 - (CGSize

UIPageControl + circular (Infinite) scrolling

青春壹個敷衍的年華 提交于 2020-01-17 03:18:25
问题 I am working on app in which i have to make welcome screen. In that UIPageControl i need to display different 9 subviews. Also need infinite circular scrolling in that. It means after page-9 if i slide than page-1 should appear. I have tried so much to implement it but never got expected results. Can anyone help me out to get the best solution for it. Thanks. 回答1: I recommended to use iCarousel for doing this task. I do following changes in to there demo Buttons Demo .h class @property

Reduce dot size or padding to fit all page indicators on screen with UIPageControl

只愿长相守 提交于 2020-01-12 04:31:26
问题 I have a UIPageControl that has 22 pages, therefore 22 page indicator dots. In landscape on iPhone they're all visible with plenty of space on the left and right, but in portrait there's not enough horizontal space to display all of the dots (at least on iPhone 4 and 5), so two aren't visible and the outer two are cut in half. I am looking for a way to reduce the size of the dots or reduce the amount of padding between the dots to ensure all dots fit on screen in portrait. How can that be

Swift PageControl larger dot on current page

余生颓废 提交于 2020-01-11 12:51:28
问题 I am attempting to scale dot of the current page to be larger than the dots which are not 'selected'. I am using the scrollview delegate to ascertain which page is current. At the moment there is no change to the size of the dot. How would I go about achieving this? func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { var i = 0 if(scrollView.contentOffset.x < scrollView.frame.width){ pageControl.currentPage = 0 pageControl.subviews.forEach { if(i == 0){ print("Edit") $0.transform

Access the UIPageControl created by iOS6 UIPageViewController?

≯℡__Kan透↙ 提交于 2020-01-11 05:04:49
问题 I'm using a UIPageViewController with Navigation set to Horizontal, Transition Style set to Scroll (in InterfaceBuilder), and no spine. Which gives me a lovely UIPageControl integrated. Now I want to be able to toggle whether it's displaying (because there's artwork underneath it). I've tried setting presentationCountForPageViewController and presentationIndexForPageViewController to return 0 when the UIPageControl is supposed to be hidden, but those methods aren't being called when I want.

Access the UIPageControl created by iOS6 UIPageViewController?

强颜欢笑 提交于 2020-01-11 05:04:10
问题 I'm using a UIPageViewController with Navigation set to Horizontal, Transition Style set to Scroll (in InterfaceBuilder), and no spine. Which gives me a lovely UIPageControl integrated. Now I want to be able to toggle whether it's displaying (because there's artwork underneath it). I've tried setting presentationCountForPageViewController and presentationIndexForPageViewController to return 0 when the UIPageControl is supposed to be hidden, but those methods aren't being called when I want.

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

﹥>﹥吖頭↗ 提交于 2020-01-09 04:14:06
问题 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

Load childViewController to scrollview parent with a button

扶醉桌前 提交于 2020-01-06 06:58:21
问题 I'm using the PageViewController (https://www.cocoacontrols.com/controls/pageviewcontroller) to create a Magazine App similar to Wired. I've used this code on CustomPagerViewController to load the childview's: - (IBAction)btn_index:(id)sender { NSInteger currentPage = 3; CGPoint offset = CGPointMake(currentPage * self.scrollView.frame.size.width, 0); [self.scrollView setContentOffset:offset animated:YES];} But I need several buttons on the indexviewcontroller to load the correct views and

subviews of Custom UIPageviewControl return UIView in ios7 but UIImageView in ios6

怎甘沉沦 提交于 2020-01-05 10:30:01
问题 Hi I am working on customPageControl. It is working fine on iOS 6 but app crashes on iOS 7. the detailed Scenario is as follow: I am using a customPageControl file in my project. For detailed CustomPageControl you can go through this link. In iOS 6 [self.subviews objectAtIndex: 1] returns UIImageView but in iOS 7 it returns UIView . And I am using UIImageView * imageView = [self.subviews objectAtIndex: 1]; imageView.image = [UIImage <SomeImage>]; in iOS 7 it take imageView as UIView and give