extending SDL_uikitappdelegate and SDL_uikitviewcontroller i |
extending SDL_uikitappdelegate and SDL_uikitviewcontroller i |
Eric Wing
Guest
|
On 9/19/16, Davide Coppola wrote:
There may be other people who have actually done this with SDL, so I hope they chime in, but in Objective-C, there is something called "categories" where you can add new methods to an existing class without needing access or modifying the original class. So if you just need to add methods, then just use categories to add your new methods. Something like (typed in mail / not checked) // SDL_uikitappdelegate+MyExtraMethods.m @implementation SDL_uikitappdelegate (MyExtraMethods) - (BOOL) myNewMethod1 { return YES; } - (void) myNewMethod2 { SDL_Log("do something"); } @end // SDL_uikitviewcontroller+MyExtraMethods.m @implementation SDL_uikitviewcontroller (MyExtraMethods) - (BOOL) myNewMethod1 { return YES; } - (void) myNewMethod2 { SDL_Log("do something"); } @end -Eric _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|