What will the return value for performSelector: if I pass a selector that returns a primitive type (on object), such as 'week' on NSDateComponents (which will return an int)?
Objective-c – Return value for performSelector:
cocoacocoa-touchobjective cperformselector
Related Topic
- Ios – How to check for an active Internet connection on iOS or macOS
- Ios – How to make a UITextField move up when the keyboard is present – on starting to edit
- Objective-c – How to convert an NSString into an NSNumber
- Ios – Xcode – How to fix ‘NSUnknownKeyException’, reason: … this class is not key value coding-compliant for the key X” error
- Ios – Passing data between view controllers
- Ios – performSelector may cause a leak because its selector is unknown
Best Answer
An example of using NSInvocation to return a float: