The input box has a general border (blank input box), full border (rectangular input box), and the border is simple, Only need to set the Uitextfield Layer.bordercolor properties and Layer.borderwidth properties on it, if you want to achieve only with the bottom of the box line of the input box is not too good to get, Baidu a bit found a most stupid is also quite a good way, that is directly below it to add a line on OK. Sample code:
Uitextfield *passwordtextfield = [[Uitextfield alloc] Initwithframe:cgrectmake (60, 120, 140, 23)];
Passwordtextfield.font = Font (15);
Passwordtextfield.placeholder = @ "Please enter password";
[Passwordtextfield Setsecuretextentry:yes];
[Self.view Addsubview:passwordtextfield];
UIView *lineview = [[UIView alloc]initwithframe:cgrectmake (0,passwordtextfield.height-1, passwordTextField.width, 1) ];
Lineview.backgroundcolor = [Uicolor Orangecolor];
[Passwordtextfield Addsubview:lineview];
By the way, please attach an effect chart: