代码之家  ›  专栏  ›  技术社区  ›  Moshe

iPad模拟器坏了

  •  0
  • Moshe  · 技术社区  · 14 年前

    Xcode报告:调试已终止。为什么?

    编辑:

    委托中的此代码似乎导致了一个问题:

    NSLog(@"Device: %@", [[UIDevice currentDevice] userInterfaceIdiom]);

    1 回复  |  直到 14 年前
        1
  •  1
  •   BojanG    14 年前

    [[UIDevice currentDevice] userInterfaceIdiom] %@ 格式说明符。

    尝试 NSLog(@"Device: %d", [[UIDevice currentDevice] userInterfaceIdiom]);