开发者社区> 问答> 正文

第一响应resignFirstResponder报错 ?报错

在一个控制器里面创建了
UINavigationController * nav = [[UINavigationController alloc]initWithRootViewController:self];
UIWindow * showWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
showWindow.rootViewController = nav;
[showWindow makeKeyAndVisible];

在当前控制器创建了一个 UITextField * pwdTextField;
[_pwdTextField resignFirstResponder];

为什么在放弃第一响应时总是报错呢?
NSScanner: nil string argument

展开
收起
爱吃鱼的程序员 2020-06-24 13:32:33 517 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    http://blog.csdn.net/chaoyuan899/article/details/42493689

    2020-06-24 13:32:49
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
面向失败设计 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载