问题
I would like to have UITextField appear only with a bottom border. See the designer's image below:
UIBezierPath *path = [UIBezierPath bezierPath];
[path moveToPoint:CGPointMake(150.0, 350.0)];
[path addLineToPoint:CGPointMake(250.0, 209.0)];
CAShapeLayer *shapeLayer = [CAShapeLayer layer];
shapeLayer.path = [path CGPath];
shapeLayer.strokeColor = [[UIColor blueColor] CGColor];
shapeLayer.lineWidth = 3.0;
shapeLayer.fillColor = [[UIColor clearColor] CGColor];
I have Tried This but not Getting Appropriate Results. Any Suggestions ?
来源:https://stackoverflow.com/questions/25976119/what-is-the-best-way-to-show-uitextfield-with-only-a-bottom-border