当前位置: 代码迷 >> 综合 >> 如何改变 detail disclosure button 的颜色
  详细解决方案

如何改变 detail disclosure button 的颜色

热度:51   发布时间:2023-12-15 19:25:09.0
1. 准备一个类似的图片:比如
redaccessoryimage.png
2. 替换
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    //...if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease];UIButton *myAccessoryButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 24, 24)];[myAccessoryButton setBackgroundColor:[UIColor clearColor]];[myAccessoryButton setImage:[UIImage imageNamed:@"redaccessoryimage.png"] forState:UIControlStateNormal];[cell setAccessoryView:myAccessoryButton];[myAccessoryButton release];//...}//... }
 
 
  相关解决方案