What is the Best Way To show UITextField with only a bottom border?

泪湿孤枕 提交于 2019-12-23 01:54:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!