标题:小白一个,关于封装的问题,求大神赐教
只看楼主
Gy1ng
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2016-10-18
 问题点数:0 回复次数:0 
小白一个,关于封装的问题,求大神赐教
例如:
.h文件
+ (instancetype)statusWithDict:(NSDictionary *)dict;
- (instancetype)initWithDict:(NSDictionary *)dict;

.m文件
+ (instancetype)statusWithDict:(NSDictionary *)dict{
    return [self alloc] initWithDict:dict];
}
  就是为什么要在类方法中创建对象调用对象方法 ? 详细点最好.谢谢了
搜索更多相关主题的帖子: 最好 return 
2016-10-18 23:19



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-469963-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.604202 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved