0

Writing a class in Swift that implements a protocol, for instance something like:

class myGreat Class : UIViewController, UITableViewDelegate, UITableViewDataSource {
    // EMPTY
}

Shows an error because of missing methods from the protocols...

Is there any keyboard shortcut to add the missing methods with empty implementations? I am used to do it in Java with IntelliJ with Alt+Enter but I can't find any similar shortcut for Swift and XCode

StuckOverFlow
  • 851
  • 6
  • 15
  • 1
    No way. My [Xcode plugin](https://github.com/xlc/XLCXcodeAssist) does it for ObjC and I may implement the Swift part if I have time. Or if someone else willing to contribute/implement their own plugin. – Bryan Chen Jan 10 '16 at 23:31
  • 2
    Similar questions: http://stackoverflow.com/questions/34564253/how-to-make-xcode-automatically-conform-to-a-protocol, http://stackoverflow.com/questions/27331588/autoimplement-swift-protocol-methods-in-xcode. Xcode has no such feature. – Martin R Jan 10 '16 at 23:34

0 Answers0