iPhone device vs. iPhone simulator

后端 未结 25 2519
暖寄归人
暖寄归人 2020-11-28 07:51

I have heard of apps not working properly on the simulator but working properly on the actual iPhone device. Has anyone experienced an app that runs perfectly in the simula

25条回答
  •  隐瞒了意图╮
    2020-11-28 07:58

    The order in which function/constructor parameters are evaluated is different:

    int i = 0;
    
    int f() { return ++i; }
    
    int a, b;
    
    int test(int p1, int p2) {
    
        a = p1;
    
        b = p2;
    
    }
    
    test( f(), f() );
    
    //simulator: a = 2, b = 1
    
    //device: a = 1, b = 2
    

提交回复
热议问题