I've just joined this forum, and I've only started programming for iOS, so this may be a very stupid question. I want to move to a different view through a button that I created programmatically. At the moment I have:
I'm not really sure about DetailsSegue, at the moment it and the first screen are embedded in a navigation controller together, with it as a push style, and the first as rootViewController. I think maybe I need to make a UIStoryboardSegue, but I didn't understand how to do that...
Code:
UIButton *sr = [[UIButton alloc] initWithFrame: buttonFrame];
[sr addTarget: self
action: @selector(ViewDetails)
forControlEvents: UIControlEventTouchDown];
- (IBAction)ViewDetails:(id)sender {
[self performSegueWithIdentifier:@"DetailsSegue" sender:self];
}
I'm not really sure about DetailsSegue, at the moment it and the first screen are embedded in a navigation controller together, with it as a push style, and the first as rootViewController. I think maybe I need to make a UIStoryboardSegue, but I didn't understand how to do that...