I created a custom button as shown in below:
-(void)addYellowBtn{
UIButton *customButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[customButton setBackgroundImage:[UIImage imageNamed: @"yellow3.jpg"]forState:UIControlStateNormal];
//sets background image for highlighted state
[customButton setBackgroundImage:[UIImage imageNamed: @"yellow5.jpg"] forState:UIControlStateHighlighted];
[customButton setFrame:CGRectMake(60, 100, 60, 60)];
[customButton setTitle:@"" forState:UIControlStateNormal];
CALayer *btnLayer = [customButton layer];
[btnLayer setMasksToBounds:YES];
[btnLayer setCornerRadius:12.0f];
[self.view addSubview:customButton];
[customButton addTarget:self action:(btnclick1:) forControlEvents:UIControlStateNormal];
}
when i click this button, next view will have to push.To do this,how can i write codings?