狐狸.fox 2009-01-15 19:36 采纳率: 100%
浏览 542
已采纳

Iphone SDK 测定设备(iPhone、 iPod Touch)

Is there a way to determine the device running an application. I want to distinguish between iPhone and iPod Touch, if possible.

转载于:https://stackoverflow.com/questions/448162/determine-device-iphone-ipod-touch-with-iphone-sdk

  • 写回答

28条回答 默认 最新

  • 衫裤跑路 2009-01-15 19:54
    关注

    You can use the UIDevice class like this:

    NSString *deviceType = [UIDevice currentDevice].model;
    
    if([deviceType isEqualToString:@"iPhone"])
        // it's an iPhone
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(27条)

报告相同问题?