开发者

how can i add a new property to an object

开发者 https://www.devze.com 2023-01-06 16:28 出处:网络
i have a custom imageView and i want to add a new prooerty \"symbol\" to it,so that i can identify every object of my cus开发者_运维技巧tom imageView.So how can i add a new property to it?Should i go

i have a custom imageView and i want to add a new prooerty "symbol" to it,so that i can identify every object of my cus开发者_运维技巧tom imageView.So how can i add a new property to it?Should i go for tag?but i have many objects,so i have to set many tags.

Please help......


The proper way to do it is to create a class that extend UIImageView, add a your variable, add the property and synthesize it.
Then if you are working with IB just change the class of you object, once added.

0

精彩评论

暂无评论...
验证码 换一张
取 消