nuteron
nuteron

Reputation: 541

Xcode not predicting

Am new to objective-c and xcode, and i love programming with them. But am facing a problem with xcode this has occurred quite a few times before, i.e the xcode's Auto-Suggestion mode is not working.

By Auto-Suggestion i mean- when i type say two letters 'UI..' xcode predicts the remaining word to be "UIColor, UIButton, .. etc".

Same for the instance methods eg. you type 'init ' and a list is shown as "initWithFrame, initWithNibName, .." and so on, which makes coding so easy.

But after i performed some operation like undo or delete i don't remember what i did exactly, this auto-prediction is not working and this is happening only on a particular file.

Any idea what i did wrong to make this happen? Thanks

Upvotes: 3

Views: 1372

Answers (3)

SnehaK
SnehaK

Reputation: 151

If there are any compile errors, then also prediction doesn't work properly. try resolving them first.

Upvotes: 0

Christopher Smit
Christopher Smit

Reputation: 959

I know this post is old, but the correct way to resolve this issue is to clear your derived data. After cleaning the derived data and restarting Xcode, your project will say "Indexing" which is the process of setting up everything required to make this feature work. After that, everything should work again.

To clear derived data go to Xcode->Preferences. Then click the little arrow next to the path to the derived data folder. Finder will open with the projects in derived data. Simply select and delete the one specific to your project giving the issue (Don't worry, this will not affect your project).

Upvotes: 0

Cyrille
Cyrille

Reputation: 25144

Xcode sometimes freaks out and exhibits this behavior. Best you can do in this case is clean your project (cmd-shift-K), close Xcode, then re-open it.

I have noticed this behavior especially when using #defined macros extensively.

Upvotes: 2

Related Questions