How can I make my textfields look like the Facebook login screen?
alt text http://img688.imageshack.us/img688/4162/phot开发者_C百科ocr.jpg
That's really a UITableView
. You can put some UITextFields
without a border inside a couple of UITableViewCells
.
I'm extremely late to the party - but this library makes this sort of UI much easier: https://github.com/escoz/QuickDialog
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.
It might be a UITableView, but then again it could be just a UIView with rounded corners and two UITextFields and a separator line.
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.
精彩评论