I’m trying to have a button on my app take me to another view when it’s pressed but for some reason t crashes all the time, i must be doing something crazy somehow. Here’s what i have:
on the header:
@interface CCS : UIViewController {
UIButton * qsnBtn;}
@property (nonatomic, retain) UIButton *qsnBtn;
-(IBAction)qsnBtnClicked:(id)sender;
@end
on the .m file:
#import "CCS.h"
#import "QSN.h"
@implementation CCS
@synthesize qsnBtn;
//QSN Button
QSN *viewController;
-(IBAction)qsnBtnClicked:(id)sender {
viewController =
[[QSN alloc]
initWithNibName:@"QSN" bundle:nil];
[self.view addSubview:viewController.view];
//[[self navigationController] pushViewController:viewController animated:YES];
}
Now i made all the connections on the .xib file but when on the CCS view which hold the button it doesn’t take me to the QSN view. Someone please help me.
That
Its not well placed there, you should do:
In the same place you have the other one