Invalid modification of IOS StoryBoard for real machines

Source: Internet
Author: User

When debugging the IOS code today, the error "has no segue with identifier" is always prompted. What's even more strange is that debugging on the simulator is normal, and debugging on the real machine will cause this error. I have been developing IOS for quite some time. I have estimated that I have performed hundreds of times of operations on the segue and page jumps in the storyboard, therefore, I don't think I will miss identify or make an error in setting destination view and resource view. But I checked it twice. That's true. As a result, I found a lot of information on the Internet, a variety of "has no segue with identifier", basically all out of the above two points, but I did not make a mistake. If something goes wrong, why is the simulator normal?

This problem took me quite a long time until I saw a post reply.

"


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 color) it was not reflected in the simulator-I wasn' t using the storyboard that I cocould 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 color 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.

"

This means that his modifications to the storyboard have not taken effect in the program. Probably the same as my error. That is to say, I wrote segue in storyboard, but it does not take effect on the real machine. It can be used on the simulator. Strange, what is the difference between a real machine and a simulator? Only one is a Chinese version and the other is an English version. I suddenly remembered that I had finished localization a few days ago. Click storyboard, and two sub-members are displayed below.

 
 


Click on the chinese character, and there is no modified segue in it. The two sub-members can be different. After modification, everything is normal.

The IOS function is really too pitfall. Why do they have to be different. Even in Chinese, there is no need to get a copy of the storyboard.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.