swift -> UIButton 添加子视图后addSubview 不影响点击

参考: http://blog.csdn.net/gaoyp/article/details/17436917

UIButton* btn = [UIButton buttonWithType:UIButtonTypeCustom];
UIView* subView = [[UIView alloc] init];
subView .userInteractionEnabled = NO;
[btn addSubview:subView];

猜你喜欢

转载自mft.iteye.com/blog/2376359