zoukankan      html  css  js  c++  java
  • UI<04>

    //声明对象
    @property (nonatomic,strong) UIPageControl *pagecontrol;
     
     //初始化
        self.pagecontrol = [[UIPageControl alloc] init];
        self.pagecontrol.backgroundColor = [UIColor greenColor];
          
        self.pagecontrol.frame = CGRectMake(0, 0, 100, 37);
        self.pagecontrol.center = CGPointMake(self.view.frame.size.width/2.0, self.view.frame.size.height/2.0);
        //总页数
        self.pagecontrol.numberOfPages = 5;
        //当前显示页
        self.pagecontrol.currentPage = 1;
        //其他页码指示器的颜色
        self.pagecontrol.pageIndicatorTintColor = [UIColor purpleColor];
        //当前页码指示器的颜色
        self.pagecontrol.currentPageIndicatorTintColor = [UIColor redColor];
        //只有一页时,是否隐藏页码指示器
        self.pagecontrol.hidesForSinglePage = YES;
        [self.view addSubview:self.pagecontrol];
       
        //添加事件
        [self.pagecontrol addTarget:self action:@selector(click:) forControlEvents:UIControlEventValueChanged];
       

  • 相关阅读:
    gnuplot 让您的数据可视化
    sort
    sed
    AWK
    STA之RC Corner再论
    STA之RC Corner拾遗
    网络编程释疑之:TCP半开连接的处理
    Task 任务内部揭秘
    Task 线程任务
    【转】SQL Server、Oracle、MySQL和Vertica数据库常用函数对比
  • 原文地址:https://www.cnblogs.com/iQingYang/p/6681144.html
Copyright © 2011-2022 走看看