NSArray *viewsToRemove = [scrollView subviews];
for (UIView *v in viewsToRemove) {
[v removeFromSuperview];
}
将设备更新到ios8时,代码将崩溃[removeFromSuperview],并显示消息"线程1:EXC_ACCESS(代码= 1,地址= 0x5000000c")
还有其他代码吗?
答案 0 :(得分:0)
NSArray *viewsToRemove = [scrollView subviews];
for (UIView *v in viewsToRemove) {
if ([v isKindOfClass:[UIView Class]]) {
[v removeFromSuperview];
}
}