Custom UITableViewCell with custom control inside

PremierPremier USMember ✭✭

Hi,
i've created a custom view and i want to use in my table.

In my custom view i've a textfield and a Text property. In set method for Text i put the value in private field and call "SetNeedsDisplay". In this way Draw method was automatically called and textfield is updated.

After putting custom view in tableview cell, it doesn't works as aspected. In GetCell i obtain an instance of custom tableviewcell with my custom view inside. I've setted Text property and called SetNeedsDisplay, but nothing is happen, textfield is empty.

Can you help me please?

Thank you

Answers

  • PremierPremier USMember ✭✭

    Solved. "Draw" method must be implemented only for graphics, not for textfield's text manipulation. For that you need to use textfield directly.

Sign In or Register to comment.