linkedin / linkedin/LayoutTest-iOS
Can't call init with data
まだ誰も着手していません。
- 主要言語
- Objective-C
- スター
- 558
- フォーク
- 46
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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;
}
`
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、StoriesASDetailViewController とその initWithStory: 呼び出しを使って、エントリポイント viewForData:reuseView:size:context: から NSInvalidArgumentException を再現します。利用可能な initializer と LayoutTest-iOS のテストフローを調査します。完了条件は、StoryRealm データを使って view controller を作成するための、確認済みで文書化された解決策が得られていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- objective-c
- 領域
- testing
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100