【发布时间】:2014-06-01 09:37:44
【问题描述】:
我是 iOS 开发新手,正在研究 iOS 的 Bluetooth Low Energy (BLE, Bluetooth 4.0)。
我看到了一些示例代码,如下所示:
@property (strong, nonatomic) CBPeripheralManager *peripheralManager;
- (void)viewDidLoad
{
[super viewDidLoad];
// Start up the CBPeripheralManager
_peripheralManager = [[CBPeripheralManager alloc] initWithDelegate:self queue:nil];
}
The question is :
为什么在ViewDidload的peripheralManager前加上“_”?
对不起我的英语和任何愚蠢的...
提前致谢。
【问题讨论】:
-
这也是很多其他编程语言中非常常用的风格
-
@BryanChen - 只是说这已被标记为重复,但您链接到的答案是 2009 年提出的问题,并且接受的答案与更新后的编译器/目标语法不匹配C
标签: ios objective-c