views:

247

answers:

4

How can I make my textfields look like the Facebook login screen?

alt text

+1  A: 

That's really a UITableView. You can put some UITextFields without a border inside a couple of UITableViewCells.

Dave DeLong
How can I make my UITableView rounded like that in IB?
Sheehan Alam
@Sheehan that's done automatically when you use a `UITableView` in the "grouped" style.
Dave DeLong
A: 

Use a grouped table for your UITableView (i.e., UITableViewStyleGrouped) with one section and two rows. Then put UITextFields in the table cells (you may have to make custom table cells) and set the placeholder property to whatever text you want to display before the user types somethings.

yabada
A: 

It might be a UITableView, but then again it could be just a UIView with rounded corners and two UITextFields and a separator line.

progrmr
A: 

I believe you're asking how to style UITextView, not how to setup a UITableView, so what I would do is create a .PNG image that's mostly white with two little rounded corners up top. Flip the image vertically and you have the one for the bottom. Drag both to your resources folder in XCode, then open up Interface Builder with the .xib. Set the background color to your blue. Click on the text field, go to Inspector and select the image you just created in the Background field. Do it again for the other field. You can use the Placeholder field to create the gray "Email" and "Password" placeholder text.

editor