L
L
Lorem Ipsum2014-11-23 19:36:06
Objective-C
Lorem Ipsum, 2014-11-23 19:36:06

How to make border-bottom for textfield?

Good day to all! Can you please tell me how to set textfield'u only 1 frame from the bottom? in css border-bottom :) are there similar methods in obj-c ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
An, 2014-11-24
@GeorgeGeorge

You just need to use a custom background, in the form of a picture. stackoverflow.com/questions/5094907/custom-uitextfield. Well, or as an option, override drawRect: and draw whatever you want there. There are also options of varying degrees of crutchness ..

A
Alexander Shcherbakov, 2014-12-22
@mkll

You can try playing around with UIEdgeInsets for the border layer - for the sides the insets will be unimportant, but for the top inset it will be equal to the textField's height, so it will match the bottom border.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question