uipagecontrol

iOS - load and switch between pages using UIPageContol

一世执手 提交于 2020-01-03 03:26:22
问题 I would like to use UIPageControl to navigate between different view controllers. I have 2 view controllers and another main view controller contains the UIPageControl . The 2 view controllers to be navigated between have been added as children to the main view controller. When I currently start the application, I see a blank screen. I used pageControl.currentPage = 0 but I am unable to understand why I am unable to see the views. Note that I do not want to use UIScrollView in my application.

iOS - UIButton on UIPageControl not working

淺唱寂寞╮ 提交于 2019-12-31 05:22:05
问题 I am using UIPageControl as indicator between different page (view controllers) of my application. In each of the view controllers, I need to have a different button on the left corner on the UIPageControl. If I place a UIButton at that position on each of the view controllers, I see it on the UIPageControl but the buttons do not respond to the touch event. Is there something I am missing? Or is there an alternative to do this? Thanks. 回答1: I guess the page control and the view controller

How to use UIPageControl with iCarousel?

蹲街弑〆低调 提交于 2019-12-30 07:11:08
问题 I have some images within icarousel. (about 20 images) I wanna 5 images in a page. There is no problem about image pixel or image location. How to use uipagecontrol WITHOUT ScrollView? ex) able to use some delegate methods.. and so on. carousel.type = iCarouselTypeLinear; carousel = [[iCarousel alloc] initWithFrame:CGRectMake(0, 504, 1024, 164)]; carousel.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"10004.png"]]; carousel.delegate = self; carousel.dataSource = self;

Send data and Change Page on button press using UIPageControl

ε祈祈猫儿з 提交于 2019-12-25 02:43:15
问题 I am using UIPageControl and UIScrollView to move between the views by scrolling. I have followed this tutorial. I have a button in the first of the view controllers. I would like to send data to the second view controller and also change the page. I would like to know how it is done. 回答1: You would need to have all of the view controllers created (born at least the first 2) rather than loading purely on demand (scroll). Add a property to the first controller which holds a reference to the

Defining scroll amount with UIScrollView and PageControl

送分小仙女□ 提交于 2019-12-24 19:00:17
问题 For the application I am working on I need a scrollview with paging along with a number of views (in this case tableviews). Setting this up (using Apple's PageControl example) is easy enough and I have no problem making it work in regards to scrolling and snapping between pages. I want the tableviews to be almost like thumbnail representations of the tableviews in the scrollview. Once you click one it opens or zooms in to let the tableview cover the entire screen. Again, setting this up is

UIPage Control custom style NatGeo

江枫思渺然 提交于 2019-12-24 10:26:40
问题 In my app I have UIView that flow through the use of a horizontal scrollView. To scroll the view I used the classimo method [self addChildViewController: [self.storyboard instantiateViewControllerWithIdentifier: @ "name Storyboard ID"]]; Each UIView is followed through the use of UIPageControl classic, but I do not like it and so I wanted to create something like this (see photo) as you can see from the images above application there is a menu with a triangle pointing down, Indicating the

How to change the label text in UIScrollview for each page Different text?

…衆ロ難τιáo~ 提交于 2019-12-24 06:44:55
问题 Hi in my app i want to show label text different at each image in UIScrollView. Here is my code. for (int i=0; i<imageArray.count; i++) { NSString *str = [imageArray objectAtIndex:i]; NSString *bannerImageURL = [NSString stringWithFormat:@"http://url.com", str]; CGFloat myOrigin = i * self.view.frame.size.width; UIImageView *myImageView = [[UIImageView alloc] initWithFrame:CGRectMake(myOrigin, 0, self.view.frame.size.width,imgScrollView.frame.size.height)]; myImageView.contentMode =

problem in UIPageControl

此生再无相见时 提交于 2019-12-24 02:09:44
问题 pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(153,356,38,36) ]; pageControl.userInteractionEnabled =YES; pageControl.numberOfPages = 2; pageControl.currentPage = 1; pageControl.enabled = TRUE; [pageControl setHighlighted:YES]; [pageControl addTarget:self action:@selector(changePage:) forControlEvents:UIControlEventValueChanged]; [self.view addSubview:pageControl]; } - (IBAction) changePage:(id)sender { } I'm programmatically creating page control and i want to display new view

UITableViewController inside UIScrollView with Horizontal Paging

佐手、 提交于 2019-12-21 04:50:20
问题 this is the situation: I need horizontal scrolling, and table views inside every page. This is something like news app, it should display news from different categories, when scrolled in one horizontal direction, and inside one category it should display about 30 news, vertically scrollable, of course. I have successfully done what i need, but... I have following scenario: UINavigationController |__ UIViewController, which contains ScrollView and PageControl |__ UITableViewController, which

Creating a Vertical UIPageControl

时光总嘲笑我的痴心妄想 提交于 2019-12-20 19:39:04
问题 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