gpt4 book ai didi

iPhone ivar 命名约定

转载 作者:太空狗 更新时间:2023-10-30 03:12:12 29 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How does an underscore in front of a variable in a cocoa objective-c class work?

我注意到在很多引用资料中,我看到很多时候,变量在 .h 文件中被命名为 _variable,然后在 .m 文件中被 @synthesize 命名为

@synthesize variable = _variable;

为什么要这样做?我错过了什么?

谢谢!

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