ios - Child UITableViewController can't receive notification from Parent UITableViewController? -


As a question, I am sending information to a child TVC and that child is unable to receive TVC notification and excitement Selector Handle Notification: (NSNextification *) paramotif . To wit.

My code is below and it is very self explanatory. Get no NSG output

I should add that the TVC of my parents is also receiving notification from a model view and removing themselves from the center in dealloc , but still doing this work Because its parents?

Parents UITableViewController

viewDidAppear

  [Auto post notification TOD5TVC];   ]; NSString * kNotifName2 = @ "workout"; NSNotification * Notification = [NSNotification notificationWithName: kNotifName2 Item: Self-user information: @ {@ "kworkout": stringWithBOOL}]; [[NSNotificationCenter defaultCenter] Post Notification: Notification];   

This works fine because I have NSLog on method and before stringWithBool Segue

UITableViewController

I have a variable BOOL workout

In the Viewedload

  [Self Setup Slider: [Auto coratin]];  

contains - (BOOL) Redin

  NSString * kNotifName2 = @ "workout"; NSNotificationCenter * center = [NSNotificationCenter defaultCenter]; [Center addObserver: Self Selector: @Selector (Handle Notification :) Name: kNotifName2 Object: Zero; BOOL is OK workout = Exercise; Returns the right workout;  In Handle Notification: (NSNotification *) paramNotif  

  NSString * workoutString = paramNotif.userInfo [@ "kworkout"]; NSInteger workoutInt = [workoutString integerValue]; Workout = workoutInt; NSLog (@ Notification received in @ D5 TVC and value of bull is% i, exercising); The problem is that I did not apply Child TV C so that when the notification was sent to the mother- If the father is being sent to the child, the child is not listening to the notification. So when TV TVs loads, it can listen to "no back" and previous notifications. 


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -