objective c - Accessing a method in a super class when it's not exposed -


in subclass, i'm overriding method not exposed in super class. know have correct signature overriding superclass implementation. however, part of the new implementation, need call superclass's implementation subclass's implementation.

because it's not exposed have invoke method via call performselector:

sel superclassselector = nsselectorfromstring(@"methodtoinvoke"); [super performselector:superclassselector]; 

however, in application results in infinite recursive loop subclass's implementation invoked every time try invoke superclass's implementation.

any thoughts?

i realize atypical situation unfortunately there's no way around i'm trying do.

the way i've dealt re-declare super class' interface in subclass implementation file method want call subclass

@interface mysuperclass() - (void)supermethodiwanttocall; @end  @implementation mysubclass   - (void)whateverfunction  {     //now call super method here     [super supermethodiwanttocall]; }  @end 

i'm not sure if best way things simple , works me!


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -