我有 scoolViewController 有 UIImageView 和 UITextView.so 我们如何获取 UIImage.it 的 UItextView 文本和图像给出错误...
for(UIView *subview2 in [scroolViewController subviews])
{
NSLog(@"-----%@",subview2);
if([subview2 isKindOfClass:[UIImageView class]])
{
[dictImages setValue:subview2.image forKey:@"positionY"];
}
if(subview2 isKindOfClass:[UITextView class])
{
[dicText setValue:subview3.text forKey:@"text"];
}
}
或者当我们扭动这个
for(UIView *subview2 in [scroolViewController subviews])
{
NSLog(@"-----%@",subview2);
}
然后控制台给出:
-----<UITextView: 0xb8791d0; frame = (5 10; 285 340); text = ''; clipsToBounds = YES; userInteractionEnabled = NO; layer = <CALayer: 0xb860a30>; contentOffset: {0, 0}>
-----<UIImageView: 0xb0c9d10; frame = (134 118; 100 100); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb0c8600>>
那么我们如何从获取子视图中保存文本和图像字典...????