开发者

Should we Use Tag or Object ID to differentiate 2 different Control in an Application in Xcode and IPhone Development

开发者 https://www.devze.com 2023-02-28 19:51 出处:网络
Which one is the preferred way? Both are just num开发者_开发百科ber right?Depending on what you want to accomplish.

Which one is the preferred way? Both are just num开发者_开发百科ber right?


Depending on what you want to accomplish.

1.Tag - is not unique and is set up by you. Good thing about it is that it does not change from session to session.

EDIT:

2.Object ID - is unique, and is only used by IB internally. You don't have an access to this property from code. If you even try to change it in IB it will not let you. I was actually wondering why it is even visible.

0

精彩评论

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