gpt4 book ai didi

iphone - ViewController = _ViewController 的意思

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

<分区>

Possible Duplicate:
Prefixing property names with an underscore in Objective C

刚开始iphone App开发,发现新建工程时,在AppDelegate.m中可以看到如下代码

@synthesize window = _window;
@synthesize viewController = _viewController;

并且在 AppDelegate.h 文件中说

@property (strong, nonatomic) UIWindow window;
@property (strong, nonatomic) ViewController controller;

我只想知道这到底是什么意思,尤其是合成部分。是吗实例化局部私有(private)变量?如果是这样,这与说有何不同@synthesize View Controller ;

谢谢

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