It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetoric开发者_JS百科al andcannot be reasonably answered in its current form. F
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetoric开发者_JS百科al and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I can add and delete cells to my table view. How to have two buttons for each cell that's added?
Add the button as subview for your cell. That's it. I have given the sample:
//Create your cell then do the following
UIButton *newBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[newBtn setFrame:CGRectMake(10,5,55,55)];
[newBtn addTarget:self action:@selector(yourSelector:) forControlEvents:UIControlEventTouchUpInside];
[cell addSubview:newBtn];
精彩评论