A UITabBarController is a view inside. Time is at the bottom of the menu can be switched to the view.
B can not switch the view between the bottom of the menu with.
A pop-up is now a B, then A, B, how to access the property? Seeking answers.
Reply:
Add interfaces to B, then B is initialized to pass the value in A to B
Reply:
This problem has found the answer: http://blog.csdn.net/sirodeng/article/details/7914226
Reply:
There is another way:
B define a property in the view.
@ Property (nonatomic, strong) id delegate;
In A view was time to switch assignments.
- (Void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender
{
NSLog (@ "switched");
. ((TaskSelectViewController *) segue.destinationViewController) delegate = self;
}
In this way you can access the B View A view or change the attributes:
[((TodayViewController *) self.delegate) currentTaskBtn setTitle: group.name forState:. UIControlStateNormal];
This method comes from: "ios5 Application Development classic" Chapter 12
No comments:
Post a Comment