setNeedDisplay和setNeedsLayout [self setNeedsDisplay];//重新调drawRect - (void)drawRect:(CGRect)rect { //do sth } [self setNeedsLayout];//重新调layoutSubviews - (void)layoutSubviews { [super layoutSubviews]; }