objective c - Show AlertView from custom TableViewCell class -


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:

  1. create protocol showing alertview

    @protocol celldelegate <nsobject>  -(void) showalertview:(nsstring *) title message:(nsstring *) message;  @end 
  2. store weak reference protocol in custom cell

    @property (weak) id <celldelegate> delegate; 
  3. call delegate when need to

    [self.delegate showalertview:@"success" message:@"password changed"]; 
  4. implement protocol in tableviewcontroller

this method not work. do? how show alertview custom tableviewcell?

i can't understand question question cmay contain need.

xcode show uialertview after uitablerowselection


Comments