swift failed with exit code 1 while compiling in Xcode - possibly related to Bridging-Headers

前端 未结 25 2926
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 02:00

I have an Obj-C Project I\'m trying to migrate to Swift. I did succeed with various classes but recently ran into an issue I can\'t seem to make sense of. When I try to comp

25条回答
  •  佛祖请我去吃肉
    2020-12-05 02:18

    As for @Kampal, I'm still struggling to figure out how much to specify in a function call. For instance, creating a UIColor object sometimes requires that UIColor be specified, and sometimes doesn't.

    These both work:

    playButton.backgroundColor = .darkGrayColor()
    playButton.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal)
    

    This yields the exit code 1 error on compilation, without any debugger warning. #time-sucking debug vortex

    playButton.setTitleColor(.whiteColor(), forState: UIControlState.Normal)  
    

    So I have a new rule: when using a function that takes more than one parameter, be explicit.

    Now back to playing swift: AVOID THE VORTEX

提交回复
热议问题