Boon
Boon

Reputation: 41500

Xcode #pragma mark doesn't work for me

In Xcode method listings (activated via Ctrl-2), the method names are always listed in alphabetical order. If I do:

#pragma mark -

#pragma mark TableView delegates

...table view delegates here...

The listing doesn't show the separator or "Table View delegates" right before the table view delegate methods, it's showing them at the bottom of the list. But I have seen it working in other people's Xcode IDE. Any idea why I am getting this?

Upvotes: 2

Views: 3634

Answers (1)

Naaff
Naaff

Reputation: 9333

I think you might have "Sort list alphabetically" on in XCode Preferences under Code Sense. Uncheck this option and it should work. See this article about #pragma mark for details.

Upvotes: 5

Related Questions