just need to set all your buttonSelected.typeOfContent to "ViewController" and then replace your current code for this:
if ([buttonSelected.typeOfContent isEqualToString:@"ViewController"]) {
if ([[functions removeBlanksFromString:buttonSelected.viewControllerID] isEqualToString:@""]) {
[[[UIAlertView alloc] initWithTitle:@"Notification"
message:[NSString stringWithFormat:@"screen destination must not be empty"]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil] show];
}
else{
NSString *myUIViewControllerClassName = buttonSelected.viewControllerID;
Class myClass = NSClassFromString(myUIViewControllerClassName);
NSObject *myObject = [myClass new];
if( [myObject isKindOfClass:[UIViewController class]] ){
UIViewController *rightViewController = (UIViewController *) myObject;
rightViewController = [self.storyboard instantiateViewControllerWithIdentifier:myUIViewControllerClassName];
rightViewController.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:LOGO_COMPANY]];
[self.navigationController pushViewController:rightViewController animated:YES];
}
}
return;
}