NSArray*viewcontrollers=self.navigationController.viewControllers;
if(viewcontrollers.count>1) {
if([viewcontrollers objectAtIndex:viewcontrollers.count-1]==self) {
//push方式
}
}else{
//present方式
}
NSArray*viewcontrollers=self.navigationController.viewControllers;
if(viewcontrollers.count>1) {
if([viewcontrollers objectAtIndex:viewcontrollers.count-1]==self) {
//push方式
}
}else{
//present方式
}