I have a UITableViewController, example NewsfeedController and have synthesis property for set / get.
NewsfeedController* vc = [[NewsfeedController alloc] init];
vc.tagId = 10;
[self.tabBarController setSelectedViewController:vc];
It shows error: [UITabBarController setSelectedViewController:] only a view controller in the tab bar controller's list of view controllers can be selected.'
I see in UITabBarController setSelectedViewController: only a view controller in the tab bar controller's list of view controllers can be selected, it says "remove the synthesis of the array of view controllers you are passing".
Can u give the full code how to implement? What I need is, I want to change to other tab and pass variable, so in the NewsfeedController can use the variables. If I use [self.tabBarController setSelectedIndex:0] it can change the tab, but how do I pass the variable and trigger refresh / reinit the view?
And if possible, if use setSelectedViewController, can it change to view that is not listed in all tab controller items. (For example in UITab the tabs are: tab1, tab2, tab3. But I want to change to tab4).