Why can't I push a new view controller onto the current view?

后端 未结 4 876
半阙折子戏
半阙折子戏 2021-01-26 04:50

I am using the following code and getting the following errors:

\"Showing

4条回答
  •  爱一瞬间的悲伤
    2021-01-26 05:12

    I am thinking this is a classic case of circular references. Maybe the two classes reference each other? Because of this forward declaration you might get all kinds of warnings when trying to reference the class name or properties of the class that has the forward declaration.

    Where all have you included ChangePasscode. Also use #import rather than #include.

    UPDATE: To solve your ld: duplicate symbol... error

    It seems that you are compiling the same class ChangePasscode two times in different places of your code. This may happen in the following cases.

    1. You have put the same class implementation into two different files
    2. You actually have just one implementation of this class, however you are also linking in your project a framework or library containing a class whose name is exactly the same of yours.
    3. You could also get this error if you mistakenly let XCode's auto-complete for #import statements specify the '.m" file for the 'duplicate' class instead of the '.h'.

    Try finding in the whole project your class and make sure only one copy is available within your project.

提交回复
热议问题