我只是从界面构建器中添加了新的 uiscrollview,在 viewDidLoad 方法中我得到了它的子视图并在控制台上打印它。它显示了两个图像视图。我无法弄清楚它们是从哪里来的。
NSArray * views = [friendScrollView subviews];
NSLog(@"views are %@", [views description]);
在控制台中:
views are (
"<UIImageView: 0x1b82f0; frame = (805 203; 7 7); alpha = 0; opaque = NO; autoresize = TM; userInteractionEnabled = NO; layer = <CALayer: 0x1b6cb0>>",
"<UIImageView: 0x17b1d0; frame = (805 203; 7 7); alpha = 0; opaque = NO; autoresize = LM; userInteractionEnabled = NO; layer = <CALayer: 0x1bdbd0>>"
)
当我删除它们时,它们甚至不会从滚动视图中删除。任何想法?