Implementing UITextFieldDelegate with Swift

前端 未结 12 1264
后悔当初
后悔当初 2020-12-08 08:11

I have my ViewController class which implements UITextFieldDelegate. I have no auto complete for the funcs such as textFieldShouldBeginEditing. Is this a bug in XCode 6?

12条回答
  •  星月不相逢
    2020-12-08 08:45

    I found a little work-around. Just go to file inspector and set type to Objective-C while you are editing the file. Auto-completion presents you Swift options.

    Just switch the type back to Swift when you build.

提交回复
热议问题