[self setNeedsDisplay];//重新调drawRect
- (void)drawRect:(CGRect)rect
{
//do sth
}
[self setNeedsLayout];//重新调layoutSubviews
- (void)layoutSubviews
{
[super layoutSubviews];
}
setNeedDisplay和setNeedsLayout
原文:http://www.cnblogs.com/BinZone/p/4509215.html