Objective-C括号中的星号是什么意思? [英] Asterisk in parenthesis in Objective-C... What does it mean?

查看:207
本文介绍了Objective-C括号中的星号是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Objective-C初学者一个简单的问题:在以下示例代码中,括号中的星号是什么意思?是指针吗?预先感谢.

Just a quick question from an Objective-C beginner: what does the asterisk in the parenthesis mean in the following sample code? Is it a pointer? Thanks in advance.

#import <Foundation/Foundation.h>

@interface Tire : NSObject
@end
@implementation Tire

- (NSString *) description
{
   return (@"I am a tire.");
}

@end

推荐答案

您是正确的. *表示说明返回指向NSString对象的指针.

You are correct. The * means that description returns a pointer to an NSString object.

这篇关于Objective-C括号中的星号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆