I'm using storyboards for the most of my project, but i have one UIScrollView that consists of multiple views that are loaded from XIB
I'm stuck on how to perform a segue when a button is clicked in the XIB
What i've done already.
- Added the views to a scroll view
- Added a custom button
- added an IBAcion on the custom button
MainViewController
NSString *nibName = @"coverArticleView";
NSArray *nibObjects = [NSBundle.mainBundle loadNibNamed:nibName owner:self options:nil];
coverArticle *pageView = [nibObjects objectAtIndex:0];
pageView.articleTitle.text = ob.Title;
pageView.articleTitle.numberOfLines =0;
// updating some more properties here & designing the scroll view
[coverArticlesScrollView addSubview:pageView];
coverArticle.m (class of the XIB)
- (IBAction)buttonPressed:(id)sender {
NSLog(@"button pressed");
}
When the log 'button pressed' is printed so that's working. But how do i perform a segue when the button is pressed ?
thnx