Objective C: Initalizing static variable with static method call
Posted
by adranale
on Stack Overflow
See other posts from Stack Overflow
or by adranale
Published on 2010-05-11T14:48:18Z
Indexed on
2010/05/11
14:54 UTC
Read the original article
Hit count: 450
The Compiler claims an error saying: "initializer element is not constant", when I try to initialize a static variable inside a method with a call to a static method (with + in its definition). Anyway I can tell him that this method always returns the same value. I know this is not the same as static method, but there seems to be no constant methods in Objective-C (other than macros which won't work here because I am calling UI_USER_INTERFACE_IDIOM() from inside the method).
© Stack Overflow or respective owner