Two common problem solutions for iOS development

Source: Internet
Author: User

Two common problems in iOS development come on! We know that the iphone is using iOS and the user is very large, so iOS development has become a very popular industry. The following small Lego to bring you two common problems in the development of iOS solution, hope to the technician in the development of iOS help!

Two common problem solutions for iOS development

One, "Unknown class Xxviewcontroller in Interface Builder file." Problem handling

A Xxviewcontroller class was recently written in a static library, and then in the xib of the main project, the Xib class was specified as Xxviewcontroller, and the program ran with the following error:

"Unknown class Xxviewcontroller in Interface Builder file."

I've had this problem before, but I don't remember it very well, so I started to find the answer on the StackOverflow.

In fact, this problem has nothing to do with Interface builder, the most immediate reason is that the associated symbol is not loaded from the static library. This problem is handled by adding-all_load and-OBJC to Target's "build Setting" –> ' other Link Flags ', which is OK.

Ii. dealing with the issue of "unbalanced calls to begin/end appearance transitions for ..."

One of our business has such a demand, after entering a list needs to immediately push a Web page, do some promotional activities. On the iOS8, our implementation is all OK, but on the iOS7, we find that the Web page is not pushed out, and the console gives a warning message as follows:

"Unbalanced calls to begin/end appearance transitions for ..."

In this case, click the Return button in the navigation bar to display a black screen directly.

We went to the StackOverflow to check, there is such a hint:

"Occurs when you try and display a new viewcontroller before the current view controller is finished displaying."

It means that before the current view controller finishes displaying, it tries to display a new view controller.

So we went to check the code, it was found that in the viewdidload inside to do a network request operation, and the request back to push the Web Activity promotion page. At this point, the current view controller may not show completion (that is, the push operation is not completed).

"Basically you are trying to push two view controllers onto the stack in almost the same time."

An indeterminate result occurs when the two view controllers are pushed to the current navigation controller stack almost simultaneously, or two different view controllers are pop at the same time. So we should make sure that at the same time, there is only one operation on the same navigation controller stack, and even if the current view controller is animating, it should not push or pop a new view controller.

So finally we put the Web activity data request into the viewdidappear inside, and did some processing, so the problem solved!

Note : For more wonderful tutorials, please pay attention to the Triple design Tutorials section,

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.