IOS StoryBoard修改对于真机无效的问题
来源:互联网 发布:js调用ajax方法 编辑:程序博客网 时间:2024/06/06 23:39
今天调试IOS代码,一直提示“has no segue with identifier” 的错误。更加诡异的是,在模拟器上调试一切正常,在真机上调试才会出这个错误。开发IOS相当一段时间,对于storyboard中segue的操作、页面的跳转估计已经做过上百次,所以不觉得自己会漏写identify或者对destination view和resource view的设置产生错误。不过还是检查了两遍,的确没错。于是上网找了好多资料,各种各样的“has no segue with identifier”,基本上都是出于以上提到的两点,但是自己的确没有写错。如果有错,那么为什么模拟器是正常的?
这个问题花了我相当长的时间,直到看到一篇帖子的回帖。
“
I had the same problem and struggled with it for hours. Stackmonster's answer solved my problem (rename the storyboard), but I didn't understand why it solved the problem.
I found that when I changed an item on the storyboard (added a label or changed background colour) it was not reflected in the simulator - I wasn't using the storyboard that I could see in xcode, but an older version of the storyboard. I had to rename the storyboard in the project navigator and also rename it in the info.plist
(in supporting files) and my label appeared, and the background colour applied, and the segue worked.
I don't know why the storyboard changes weren't taking effect, but it caused me a huge amount of time to find. I've seen on the blogs that a lot of devs have the same problem.
”
意思是他对storyboard的修改并没有在程序中生效。很有可能跟我的错误一致,也就是说我在storyboard中写了segue,但是并没有在真机上生效,而在模拟器上是可以用的。奇了怪了,那么真机和模拟器有什么不同,只有一个是中文版本,一个是英文版本。突然想起来前几天做过汉化。于是点开来storyboard,下面居然出现了两个子成员。
具体点开那个chinese,里面果然没有我修改过的segue,两个子成员居然可以不同。修改之后一切正常。
IOS这个功能真是太坑了,何必两个要弄成不一样。即使汉化,也没必要弄个storyboard副本吧。
- IOS StoryBoard修改对于真机无效的问题
- iOS storyboard 修改frame问题
- iOS修改真机App的名称
- WP7 真机调试,调用相机无效的问题
- iOS 解决在Storyboard中修改UITableViewCell背景色无效果的问题
- iOS中多个StoryBoard的跳转问题
- 对于IOS布局的问题
- iOS真机测试的问题
- 真机调试iOS遇到的问题
- ios 真机测试的问题
- iOS利用storyboard修改UITextField的placeholder文字颜色
- iOS利用storyboard修改UITextField的placeholder文字颜色
- iOS利用storyboard修改UITextField的placeholder文字颜色
- 解决拦截器的对于参数传递无效问题
- 修改 RichTextEditor 属性无效的问题
- Servlet修改编码无效的问题
- cocos2d-x真机测试修改资源文件的问题
- iOS 5的StoryBoard
- HDU 1402 FFT 求 大数乘法
- bat命令大全
- 关于我们小组共享学习的一点想法:
- appserv 发生httpd.exe xxx不能为read的错误
- std::map用法
- IOS StoryBoard修改对于真机无效的问题
- uva 442 - Matrix Chain Multiplication (记忆化搜索 | 重做一年前的题)
- Android中SQLite应用详解
- uva 10387 - Billiard
- uva 10453 - Make Palindrome (区间dp,记忆化搜索)
- 【算法导论】二叉树的建立
- 在github上管理项目
- HBase列族高级配置
- C语言字符串的指针