开发者

What does the -> mean in objective C

开发者 https://www.devze.com 2023-03-17 16:32 出处:网络
Can Anyone explain what this means: oauth->url = [[NSURL alloc] initWithSc开发者_开发问答heme:@\"https\" host:host path:unencodedPath];

Can Anyone explain what this means:

oauth->url = [[NSURL alloc] initWithSc开发者_开发问答heme:@"https" host:host path:unencodedPath];

It is variable assignment but why does it use '->' is this something to do with it being a Class method?


It references the instance variable url of the oauth instance. It is pure C syntax.


Same thing it means in C/C++. Objective C objects don't use -> but C/C++ classes do.

0

精彩评论

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