0

I have an UITableView with several prototype cells and some of the editable cells are basic cells and some customs.
(XCode 4.6.1 / iOS 6.1)

My question is how to automatically align the labels of the custom cells (in the Storyboard) like it's done by default for basic cells' textLabel?

Here's two screenshots to understand what I mean: Before edit mode In edit mode

By the way, I've obviously Google'd before and didn't find anything but maybe I missed something, as I'm a newbie on iOS :)

Edit: you probably already understood the screens, but in case of: the "add" cell is a default basic cell and the "delete" cells are custom cells with my own UILabel (with the wrong alignment).

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138
Erdal G.
  • 2,694
  • 2
  • 27
  • 37
  • You are familiar with `layoutSubviews` but want to do it at storyboard ? – A-Live Apr 10 '13 at 17:09
  • Well, I just care about being able to design prototype cells content in the storyboard, as I will have more complex designs in the future. If I have to add some code it's ok though. – Erdal G. Apr 10 '13 at 20:51
  • 1
    Check [this question](http://stackoverflow.com/questions/742829/animating-custom-drawn-uitableviewcell-when-entering-edit-mode). – A-Live Apr 10 '13 at 20:57
  • Thanks, I didn't know it was so complicated for a so easy-looking stuff :) – Erdal G. Apr 15 '13 at 10:25
  • But it works really nice with not so much code, doesn't it ? Please make sure to describe your final solution at the answer and accept it, it will help somebody in the future. – A-Live Apr 15 '13 at 10:46
  • I will as soon as I succeed, for now the code compiles but nothing happens. – Erdal G. Apr 15 '13 at 14:51
  • If you post some code that will help us to find out why it's not working. – A-Live Apr 15 '13 at 15:33

0 Answers0