开发者

1 outlet connects 2 UILabel?

开发者 https://www.devze.com 2023-04-08 10:38 出处:网络
Is it possible to connect 1 outlet from file\'s owner to 2 UILabels from the 开发者_高级运维same view?

Is it possible to connect 1 outlet from file's owner to 2 UILabels from the 开发者_高级运维same view?

I try to do that, but every time I connect the outlet to the other label, it automatic disconnect from outlet to the old label?

Any ideas?

Thanks a lot!


No, it's not possible. When you add such outlet you say: "I want reference to the object of class UILabel be saved in that variable." So you can save two different values in one variable.


You could use an IBOutletCollection instead of an IBOutlet. Otherwise, what you are asking for does not make any sense. What are you trying to acheive?

0

精彩评论

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

关注公众号