i have custom tableviewcell class , viewmodel cell class. i'm using reactivecocoa raccommand on button. on subscribenext or error in custom tableviewcell class implementation, want show alertview appropriate message. can not of course show alertview because method show alertview part of uiview (presentviewcontroller). idea:
create protocol showing alertview
@protocol celldelegate <nsobject> -(void) showalertview:(nsstring *) title message:(nsstring *) message; @end
store weak reference protocol in custom cell
@property (weak) id <celldelegate> delegate;
call delegate when need to
[self.delegate showalertview:@"success" message:@"password changed"];
implement protocol in tableviewcontroller
this method not work. do? how show alertview custom tableviewcell?
i can't understand question question cmay contain need.
Comments
Post a Comment