項(xiàng)目中要實(shí)現(xiàn)一個(gè)下拉收起菜單的動(dòng)畫(huà),動(dòng)畫(huà)里視圖的高度發(fā)生變化烤镐,發(fā)現(xiàn)子視圖不執(zhí)行動(dòng)畫(huà),超出了父視圖的范圍棍鳖,發(fā)現(xiàn)與要設(shè)置俯視圖的屬性clipsToBounds為YES炮叶,子視圖就會(huì)跟著父視圖執(zhí)行動(dòng)畫(huà)。
@property(nonatomic) BOOL clipsToBounds;// When YES, content and subviews are clipped to the bounds of the view. Default is NO.