While programming for iOS I encountered the following scenario:
I have a singleton class with a class method + (Store*)sharedStore
. When I want to call an instance method on the singleton object, I can use dot syntax to get that object, i.e. [Store.sharedStore foo]
.
However, Xcode does not autocomplete 'sharedStore' after typing the dot. On the other hand, [[Store sharedStore] foo]
is autocompleted!
Is there such a thing as 'class properties'? If I could turn sharedStore
into a readonly property on the class, the dot syntax would gain autocompletion.
More generally speaking, Xcode simply does not autocomplete after dot syntax on anything that isn't a property, even though this is a valid way of calling a (getter) method.
Any solution, workaround, or information is appreciated.