Skip to content

Instantly share code, notes, and snippets.

@yoshiki-0428
Last active June 4, 2020 14:38
Show Gist options
  • Save yoshiki-0428/4c67ca6f73c819f1ba14b361a15be1bf to your computer and use it in GitHub Desktop.
Save yoshiki-0428/4c67ca6f73c819f1ba14b361a15be1bf to your computer and use it in GitHub Desktop.
iOSアプリのunrecognized selector sent to instanceエラーについて ref: https://qiita.com/yoshiki-0428/items/80ea88f65f5a62ffcc11
// 指定のViewControllerインスタンスを作成、その際に
HogeDialogViewController *vc = [
[UIStoryboard storyboardWithName:@"HogeDialogViewController" bundle:nil]
instantiateViewControllerWithIdentifier:@"HogeDialogViewController"];
// Dictionary型を作成し、Entityを作成する
NSDictionary *responseObject = [NSDictionary dictionaryWithObjectsAndKeys:
@"id", @1111,
nil];
HogeData *hogeData = [[HogeData alloc] initWithDictionary:responseObject];
vc.hogeData = hogeData;
// Dialog表示
[vc show];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment