accessory

Which is the best way to change the color/view of disclosure indicator accessory view in a table view cell in iOS?

百般思念 提交于 2019-11-28 03:16:36
I need to change the color of the disclosureIndicatorView accessory in a UITableViewCell . I think there are two ways to get this done, but I'm not able to figure out which one's the optimum. So here is what I think I can do. There is a property of UITableViewCell - accessoryView . So I can use setAccessoryView:(UIView *)view and pass view as the UIImageView holding the image that I want. I have written an utility class which creates the content view (stuff like background color, adding other stuff, etc) for my cell and I add this content view to the cell in UITableViewDelegate . The other

UITableViewCell Custom accessory - get the row of accessory

▼魔方 西西 提交于 2019-11-27 01:22:49
问题 I have a pretty big issue. I am trying to create a favorite-button on every UITableViewCell in a UITableView . That works very good, and I currently have an action and selector performed when pressed. accessory = [UIButton buttonWithType:UIButtonTypeCustom]; [accessory setImage:[UIImage imageNamed:@"star.png"] forState:UIControlStateNormal]; accessory.frame = CGRectMake(0, 0, 15, 15); accessory.userInteractionEnabled = YES; [accessory addTarget:self action:@selector(didTapStar)