Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

貌似不支持从 story board 的 VC #1

Closed
EggmanQi opened this issue Sep 28, 2016 · 3 comments
Closed

貌似不支持从 story board 的 VC #1

EggmanQi opened this issue Sep 28, 2016 · 3 comments

Comments

@EggmanQi
Copy link

把 demo 中的 initWithTitle:url:{ self = [super init]; }, 修改为self = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"WebViewController"]; (已在 main.storyboard 添加)的话就会报错。

在我自己的项目中,测试写了两个 vc,一个参数的 ok, 一个多参数的会报错。(都是调用VKCallClassAllocInitSelectorName )

@Awhisper
Copy link
Owner

收到 最近忙 wx小程序 和 antlr 可能没那么快 整理这个 以前确实没关注过xib vc
等空闲了 第一时间 fix

@EggmanQi
Copy link
Author

EggmanQi commented Sep 29, 2016

@Awhisper id allocObj = [cls alloc]; // allocObj = nil , 不知道能不能识别 vc 创建的方法。

@Awhisper
Copy link
Owner

@EggmanQi
我没太明白 这是啥意思?方便git上开个 demo说明么? 创建新vc不是必需使用 VKCallClassAllocInitSelectorName 他只是解耦创建新VC的一种快捷方案,也可使用别的,具体这就是我以前写 VKMsgSend工具的用法了,VKCallClassAllocInitSelectorName 会限制必须走 alloc 后init 如果有些VC不能走alloc出来 可以使用其他VKMsgSend的方案去call

@Awhisper Awhisper closed this as completed Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants