gpt4 book ai didi

iphone - UIImageView inArray 属性?

转载 作者:行者123 更新时间:2023-11-29 04:56:05 26 4
gpt4 key购买 nike

我将如何向 ImageView 添加某种inarray属性,以便在引用该 ImageView 时我可以读取它所在的数组?

最佳答案

最简单的方法可能是子类化 UIImageView:

@interface TrackedImageView : UIImageView {
NSArray* parentArray;
}
@property(atomic,retain) NSArray* inarray;

@end

@implementation TrackedImageView

@synthesize inarray;

@end

关于iphone - UIImageView inArray 属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7934284/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com