代码是:
-(void) tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *idetifier = [NSString stringWithFormat:@"%@",[self.menu objectAtIndex:indexPath.row]];
ECSlidingViewController *slidingViewController = self.slidingViewController;
UIViewController *newTopViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondTop"];
[self.slidingViewController anchorTopViewOffScreenTo:ECRight animations:nil onComplete:^{
CGRect frame = slidingViewController.topViewController.view.frame;
slidingViewController.topViewController = newTopViewController;
slidingViewController.topViewController.view.frame = frame;
[slidingViewController resetTopView];
}];
}
答案 0 :(得分:0)
您是否导入了库头文件?
#import <ECSlidingViewController.h> // from a static library or a cocoapod
#import "ECSlidingViewController.h" //if you directly copied the files in your project
修改强>
根据this file,您要查找的常量为ECSlidingViewControllerTopViewPositionAnchoredRight
。