Xcode compile error on bool when device not connected

前端 未结 1 440
情书的邮戳
情书的邮戳 2021-01-21 19:34

I am trying to do a simple animation by using this snippet:

[UIView animateWithDuration:2.0
                      delay:0.0
                    options: UIViewAn         


        
相关标签:
1条回答
  • 2021-01-21 20:11

    BOOL is a different type, depending on whether you compile for 32 bit or for 64 bit. There are different types used like Bool, bool, Boolean plus probably others - make sure that you use the same type everywhere.

    Plugging in your device means that code will be compiled for your device, and not for the simulator, so this can change between 32 and 64 bit and trigger the problem.

    I'd also check if there is a typedef or #define for BOOL somewhere in your code. Double-click on BOOL in your code, right-click and "Show definition".

    0 讨论(0)
提交回复
热议问题