我已经为侧边菜单实现了 SASlideMenu,除了一件事之外,一切都很出色。我不知道如何发送对象。
这是正在发生的切换视图:
-(void) switchToContentViewController:(UIViewController*) content{
CGRect bounds = self.view.bounds;
if (selectedContent) {
//Animate out the currently selected UIViewController
[UIView animateWithDuration:kSlideOutInterval delay:0.0 options:UIViewAnimationCurveEaseInOut animations:^{
selectedContent.view.frame = CGRectMake(bounds.size.width,0,bounds.size.width,bounds.size.height);
} completion:
^(BOOL completed) {
[selectedContent willMoveToParentViewController:nil];
[selectedContent.view removeFromSuperview];
[selectedContent removeFromParentViewController];
content.view.frame = CGRectMake(bounds.size.width,0,0,bounds.size.height);
[self addChildViewController:content];
[self.view addSubview:content.view];
[UIView animateWithDuration:kSlideInInterval delay:0.0 options:UIViewAnimationCurveEaseInOut animations:^{
content.view.frame = CGRectMake(0,0,bounds.size.width,bounds.size.height);
} completion:^(BOOL completed){
selectedContent = content;
[content didMoveToParentViewController:self];
[self.shield removeFromSuperview];
}];
}];
}else{
[self addChildViewController:content];
[self.view addSubview:content.view];
content.view.frame = CGRectMake(0,0,bounds.size.width,bounds.size.height);
selectedContent = content;
[self.shield removeFromSuperview];
[content didMoveToParentViewController:self];
}
}
我想要的是在这里获取标识符(NSString)(我会知道如何解决),然后发送到这个将打开的新视图控制器。
我怎样才能做到这一点?