Can't call init with data
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 20/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- objective-c
- 领域
- testing
调研方向
首先,使用 StoriesASDetailViewController 及其 initWithStory: 调用,从 viewForData:reuseView:size:context: 入口点复现 NSInvalidArgumentException。检查可用的 initializer 和 LayoutTest-iOS 测试流程;完成标准是得到一个已确认并记录在案的、使用 StoryRealm 数据创建视图控制器的解决方案。
由索引模型根据 Issue 内容生成。
描述
Hey! Really excited to get this project working for me.
I have a number of views and view controllers I would like to test. I am using Realm in-memory to create Realm Objects to pass into my inits to instantiate my views and view controllers.
failed: caught "NSInvalidArgumentException", "-[StoriesASDetailViewController initWithStory:]: unrecognized selector sent to instance 0x7fa5fbe07ce0"
No matter what I try, be it a cell or tableviewcontroller, I just keep getting the error above.
Any advice?
`
+(UIView *)viewForData:(NSDictionary *)data reuseView:(UIView *)reuseView size:(LYTViewSize *)size context:(id _Nullable __autoreleasing *)context {
StoryModel *story = [[StoryModel alloc] initWithDictionary:data error:nil];
StoryRealm *local = [[StoryRealm alloc] initWithStoryModel:story];
StoriesASDetailViewController *footer = [[StoriesASDetailViewController alloc] initWithStory:local];
StoryDetailCell *cell = [footer.collectionNode cellForItemAtIndexPath:0];
*context = footer;
return cell;
}
`
- 主要语言
- Objective-C
- 星标
- 558
- 派生
- 46
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
linkedin/LayoutTest-iOS 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
linkedin/LayoutTest-iOS#42 ·
-
难度 4/5 3-5 天 新手友好度 35/100
linkedin/LayoutTest-iOS#40 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
linkedin/LayoutTest-iOS#38 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
linkedin/LayoutTest-iOS#36 · 1 条评论 · 2 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
linkedin/LayoutTest-iOS#33 · 2 条评论 · 1 个 reaction ·
查看 linkedin/LayoutTest-iOS 的全部 Issue
相似的 Issue
-
Icons Metro Public Transport
难度 1/5 1 小时以内 新手友好度 75/100
organicmaps/organicmaps#13617 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
objective-see/LuLu#925 ·
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 72/100
noah-nuebling/mac-mouse-fix#2054 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
obsproject/obs-studio#13918 ·