armnotstrong
armnotstrong

Reputation: 9065

Auto fix implement of missing method of protocol with Xcode?

I am not very familiar with Xcode,

Since I think every decent IDE should have a shortcut for auto-fix a template of implemented protocol (such as interface in java) to save some effects of the programmers to just fill in the logic and don't have to type in the method name and parameter stuff.

Such as when we meet this:

enter image description here

And I googled around and some guy said that there should be a fix all in scope thing in the Editor, but seems I can't make that clickable :-(

enter image description here

So, how to do this with xcode? Thanks.

Upvotes: 0

Views: 423

Answers (1)

meaning-matters
meaning-matters

Reputation: 22946

Unfortunately Xcode is fairly behind compared to other IDE's in features for refactoring and such.

The main Xcode version: 8.x, can't do what you wish for. But some of it will be/is available in beta Xcode 9

Xcode may suggest a fix for a compiler error. You can click the errors individually to see the suggested fix(es) and select one.

Alternatively the 'Fix All In Scope' allows you to tell Xcode to select suggested fixes of the current file.

Upvotes: 2

Related Questions