views:

164

answers:

1

Hi,

I'm just starting to refactor my spaghetti code in xcode. I do the following:

  • select my class name in the header file
  • choose Refactor from the menu
  • pick "Create superclass of" from the dropdown
  • type in my superclass name
  • hit Preview

Then I get this big ugly error popup: "Can't find @implementation for class 'MyUglyClass'" ... and the refactor process exits.

Now I know the implementation is there in the .m file. The app builds and runs fine, no errors, no warnings, and xcode will happily "Jump To Definition".

Can anybody suggest what the problem might be? I could just refactor this by hand - no bog deal - but that's not a habit I want to get into.

Thanks heaps, LBB

A: 

Refactoring is best done by hand. What Xcode does automatically should generally be treated as a suggestion.

Azeem.Butt