@yar1vn's answer is right, however, I'll describe more precisely what you need to do.
Custom alert view from your link has a delegate
property, which should conform to protocol
@protocol CustomIOS7AlertViewDelegate
- (void)customIOS7dialogButtonTouchUpInside:(id)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;
@end
that means you should implement this method in your UIViewController.
in .h file:
@interface YourViewController : UIViewController <YourViewController>
...
@end
in .m file:
@implementation YourViewController
...
- (void)customIOS7dialogButtonTouchUpInside:(id)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
[self performSegueWithIdentifier:@"YourSegue" sender:nil];
}
and set the delegate when creating alertView:
[alertView setDelegate:self];
@"YourSegue"
is the segue from the controller which shows alertView to the detail view controller.
I disagree that you should use UIAlertController, since if your deployment target is iOS 7 (which is reasonable) you should not use new features of iOS 8
EDIT:
if you want to launch segue from tap on table view cell, you should call [self performSegueWithIdentifier:@"YourSegue" sender:nil]
from tableView's delegate method -tableView:didSelectRowAtIndexPath:
I assume you have set current view controller as tableView's dataSource and delegate, so add to your view controller
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"YourSegue" sender:nil];
}
EDIT 2:
though setting the UIView as delegate is not the best approach, we can handle it :)
I see two solutions:
the first is to add the controller as the property to your view like this:
@interface YourView : UIView <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, weak) YourViewController *parentController;
...
somewhere (probably, in -viewDidLoad
) you set this property as
youViewInstance.parentController = self;
and the in view's delegate method call
[self.parentController performSegueWithIdentifier:@"YouSegue" sender:nil]
the second one is to simply set the controller as tableView's delegate and call performSegue:
from its method. And you should describe all details more completely :)