[iOS]创建一像素的线

    float sortaPixel = 1.0/[UIScreen mainScreen].scale;
    UIView* line = [[UIView alloc]initWithFrame:CGRectMake(0,150,WIDTH,sortaPixel)];
    line.backgroundColor = [UIColor purpleColor];
    [self.view addSubview:line];

 

posted @ 2016-12-27 16:00  death3721  阅读(124)  评论(0编辑  收藏  举报