//通过判断导航栏的跟控制器,及导航栏控制器的个数区分不同的入口
if ([[self.navigationController.viewControllers objectAtIndex:0] isKindOfClass:[MerchantTableViewController class]]){
NSInteger controllerCount = [self.navigationController.viewControllers count];
if (controllerCount > 2) {
if (controllerCount > 5) {
//发送图片
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:controllerCount - 3] animated:YES];
return;
}else{
//发送商家
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:controllerCount - 4] animated:YES];
return;
}
}
}