I do not understand why an error occurs, the type of the returned message is the same, and Xcode swears.
Please tell me why?
I do not understand why an error occurs, the type of the returned message is the same, and Xcode swears.
Please tell me why?
Probably you are used to putting an asterisk on the return type of the method. So objects are transferred to ObjC:
- (NSTimer*) makeTimer; This is because you need to pass the адрес object, since there is only one necessary instance of the class in memory. But for the return of primitive types of links are not needed, in most cases it is more problematic than useful. Therefore, in such cases you need to pass the value itself:
- (NSUInteger) calculateSmth; Source: https://ru.stackoverflow.com/questions/511954/
All Articles