0

Is that possibile to use this design from some apple's library for textfields?

enter image description here

it is the standard editable textfield on native ios 7 contacts. And if it's not possible, how to use a separator between leftview and textfield like in this picture?

Balaji Kandasamy
  • 4,115
  • 10
  • 36
  • 58
Alessio Crestani
  • 1,484
  • 4
  • 16
  • 37
  • 1
    That looks more like a `UITableViewCell` then a `UITextField`. Are you sure it's a `UITextField`? – Popeye Jan 20 '14 at 11:36
  • look in "contacts" app of your iphone/ipad/simulator, open a contact and press "edit" at the right top of the screen and you will see :) – Alessio Crestani Jan 20 '14 at 11:39
  • Yep - that is definitely a `UITableViewCell` not a `UITextField` or `UITextView`. Have a look at some of these http://stackoverflow.com/questions/6001852/uitableview-edit-mode http://behindtechlines.com/2012/06/enabling-configuring-uitableview-edit-mode/ http://stackoverflow.com/questions/17591121/uitableview-cell-edit – Popeye Jan 20 '14 at 11:44

2 Answers2

0

those separators are just views but with width 1 pixel and height equal to height of cell.

UIView *view =[[UIView alloc] initWithFrame:CGRectMake(100,0,1,30)];
view.backgroundColor =[uicolor lightGreyColor];

[add it as subview to your view]
codercat
  • 21,439
  • 9
  • 56
  • 84
santhu
  • 4,698
  • 1
  • 19
  • 29
  • No it's not. That is a `UITableView` in edit mode -1. – Popeye Jan 20 '14 at 11:48
  • yes sir.but he asked "And if it's not possible, how to use a separator between leftview and textfield like in this picture?". so there is my answer for it. – santhu Jan 20 '14 at 11:49
  • It's still wrong. If they are wanting to use that design that is in the contacts app when you press edit then they need to be implementing a `UITableView` that allows the user to edit the cells. Just adding your own `UIView` in is incorrect, they clearly didn't know what they were actually looking for/at so best thing to do is to correct them, also what's `uicolor`? It should be `UIColor` – Popeye Jan 20 '14 at 11:53
0

there no create by default apple SDKs but you achieve like customize your table view cell

Sample App

enter image description here

codercat
  • 21,439
  • 9
  • 56
  • 84
  • Why would you need to use a third party to achieve this? This can be got by the default behaviour of `UITablViewCell` and `UITableView`. – Popeye Jan 20 '14 at 12:15
  • they example tell how to we are customize the tableViewCell thats all @Popeye – codercat Jan 20 '14 at 12:31
  • See I didn't get that as your answer doesn't say anything like that. Maybe you should tell them how to it yourself. As this just says to me here is some third party code you can use when it isn't really needed. – Popeye Jan 20 '14 at 12:33
  • and can I have at least the separator between leftview and textfield without the implementation of a text view? – Alessio Crestani Jan 20 '14 at 13:40
  • It's not a text view please look at `UITableView` implementation. – Popeye Jan 21 '14 at 08:57