Hi guys I've a problem with my project. I've an UIViewController with a UITableView inside. This table loads some custom cell (LSButtonCell). I've tried to push/pop multiple times this view and I've discovered this strange behavior:
http://i.stack.imgur.com/J0b4D.png Seems UITableViewCell will not release itself. What'开发者_如何学Pythons happened? Any idea?So far it looks ok, I would make sure that dealloc is called. Try adding NSLog statements in your dealloc methods to see if they are called on screen pop.
There are some issues in your code:
1) You should never retain delegate, only assign. It leads to mutual retaining. So neither of two objects will ever be deallocated.
2) Avoid initiating views with zero rect. For UIView
initWithFrame:(CGRect)aFrame
is designated initializer, so aFrame is necessary argument it is easy to guess that necessary argument should not be 0. CGRectZero can play a bad trick on you one day.
3) When you synthesize properties use names for ivars that differs from names of properties, i.e. @synthesize delegate = delegate_;
so you will never miss calling of setter and getter methods.
Speaking of your problem, it would help if you add header of LSButtonCell to your question.
精彩评论