Question

Since installing Xcode 4.3, and continuing now with 4.3.1, Xcode is no longer able to perform Refactor->Extract... operations. This worked fine in previous builds. When you would select a block of code in an obj-c method, it would calculate the arguments and return type suited to your needs, let you select the method signature, show you a preview, then alter the code.

Now, it lets you select the method signature, but on the preview step, an error pops up with the text "Can’t extract method from code not already in a method."

Does anyone know a way around this, or have they really broken extraction in these builds?

Was it helpful?

Solution

I think I have found the reason.

In my case, I tried to do this extraction in the implementation of a delegate method. So it may be that Xcode didn´t find the interface of that method and then he shows the error.

This is the reason in my own case, I don´t know if this is a Xcode´s bug or not.

Well I hope this can helps you :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top