开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜