GM release of Xcode 6 compile

前端 未结 21 2448
难免孤独
难免孤独 2020-12-02 15:37

I just downloaded the GM release of Xcode 6 and it won\'t compile with this error:

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault         


        
21条回答
  •  天涯浪人
    2020-12-02 16:15

    In my case Xcode gave the error because of the following line :

    if UI_USER_INTERFACE_IDIOM() ==  UIUserInterfaceIdiom.Phone {
    
    
    }else {
    
    }
    

    And to fix the error I've defined this :

    enum UIUserInterfaceIdiom : Int {
        case Unspecified
        case Phone // iPhone and iPod touch style UI
        case Pad // iPad style UI
    }
    

    And then i used it like :

     if UIDevice.currentDevice().userInterfaceIdiom == .Phone {
    
    }
    

    Good luck !

提交回复
热议问题