• ios UIPageControl


    UIPageControl
    作用:页数的提醒
    核心属性:

    numberOfPages 圆点的个数
    currentPage 当前被选中的是第几个小圆点

    滚动视图:

    
    - (void)viewDidLoad {
        [super viewDidLoad];
        self.view.backgroundColor = [UIColor whiteColor];
        //去掉导航栏前 半透明的图片
        [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
        
        
        UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"background"]];
        //创建滚动视图
        UIScrollView *sv = [[UIScrollView alloc]init];
        self.sv = sv;
        sv.backgroundColor = [UIColor redColor];
        //设置可见区域的大小
        sv.frame = CGRectMake(0, 0, 200, 200);
        //设置内容区域
        sv.contentSize = imageView.frame.size;
        //设置隐藏滑动时垂直方向滚动条
        sv.showsVerticalScrollIndicator = NO;
        //设置显示内容
        [sv addSubview:imageView];
        
        //方式一:关闭 控制器 有导航栏时自动调整滚动视图内容的功能
    //    self.automaticallyAdjustsScrollViewInsets = NO;
    
        //方式二:调整内边距
        sv.contentInset = UIEdgeInsetsMake(-64, 0, 0, 0);
        
        [self.view addSubview:sv];
        
    }
    
    成功的三大原则: 1、坚持 2、不要脸 3、坚持不要脸
  • 相关阅读:
    052-34
    052-33
    052-32
    052-31
    052-30
    052-28
    react组件之间通信
    排序算法
    点外卖
    js的各种排序算法
  • 原文地址:https://www.cnblogs.com/xulinmei/p/7420248.html
Copyright © 2020-2023  润新知