lundi 29 décembre 2014

UIViewController UIButton can't touch

i have two UIViewController, A & B



[A addSubView: B.view];


it's ok.


but i got an question, i can't get the B's UIButton Touch Event after [A addSubView: B.view] why?


is anyone can help me thank you~


Here's my some code :


A View:



CellAction_ViewController *cellActionViewController = [[CellAction_ViewController alloc] initWithNibName:@"CellAction_ViewController" bundle:nil];

[cell.contentView addSubview:cellActionViewController.view];
[cellActionViewController.button_like addTarget:self
action:@selector(Likes_Button:)
forControlEvents:UIControlEventTouchUpInside];

cell.selectionStyle = UITableViewCellSelectionStyleNone;


B View:



- (void)viewDidLoad {
[super viewDidLoad];

// bala bala ...
[_button_like setClipsToBounds:YES];
}



Aucun commentaire:

Enregistrer un commentaire