29 Sept 2017

How to add Borderline to View...



How to add Borderline to View...


@property (weak, nonatomic) IBOutlet UIView *topView;



    // Add a bottomBorder.
    CALayer *bottomBorder = [CALayer layer];
    
    bottomBorder.frame = CGRectMake(0.0f, 39.0f, self.view.frame.size.width, 0.8f);
    bottomBorder.backgroundColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.2].CGColor;
    [_topView.layer addSublayer:bottomBorder];

No comments:

Post a Comment

Recent Posts

Codable demo

Link: https://www.dropbox.com/s/kw7c1kgv1628bh7/codableDemo.zip?dl=0