[英]Is UIImageView of type UIView
I am new to Objective-c.我是 Objective-c 的新手。 a loop is created to iterate through items or entries of UIView that are displayed in the storyboard.
创建一个循环来遍历 storyboard 中显示的 UIView 的项目或条目。 the storyboard contains a UIScrollView and the UIScrollView encompass 7UIViews and 2 UIImageView.
storyboard 包含一个 UIScrollView 和 UIScrollView 包含 7UIViews 和 2 个 Z825133833D3CD2348CBFF3DB the loop I have in the code, iterated through 9 entries.
我在代码中的循环,迭代了 9 个条目。 i expected the loop to iterate through 7 entries as there are UIViews and two UIImageViews.
我希望循环遍历 7 个条目,因为有 UIViews 和两个 UIImageViews。
My question is, is UIImageView is of type UIView?我的问题是,UIImageView 是否属于 UIView 类型?
yes, a UIImageView is of type UIView是的,UIImageView 的类型是 UIView
UIKIT_EXTERN API_AVAILABLE(ios(2.0)) @interface UIImageView : UIView
and UIView is of type和 UIView 是类型
UIKIT_EXTERN API_AVAILABLE(ios(2.0)) @interface UIView : UIResponder <NSCoding, UIAppearance, UIAppearanceContainer, UIDynamicItem, UITraitEnvironment, UICoordinateSpace, UIFocusItem, UIFocusItemContainer, CALayerDelegate>
and UIResponder is of type并且 UIResponder 是类型
UIKIT_EXTERN API_AVAILABLE(ios(2.0)) @interface UIResponder : NSObject <UIResponderStandardEditActions>
so UIImageView inherits everything from NSObject, UIResponder, and UIView and is of type NSObject, UIResponder, and UIView所以 UIImageView 继承了 NSObject、UIResponder 和 UIView 的所有内容,并且属于 NSObject、UIResponder 和 UIView 类型
good luck祝你好运
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.