ios - uibuttontypedetaildisclosure custom image -
is possible change image of uibuttontypedetaildisclose default 1 more interesting. however, notice i'm asking button, rather 1 type of uibutton.
you have change accessoryview of cell.
-(uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath // code initializing cell.. uiimage *image = [uiimage imagenamed:@"interestingimage.png"]; uibutton *button = [uibutton buttonwithtype:uibuttontypecustom]; cgrect frame = cgrectmake(44.0, 44.0, image.size.width, image.size.height); button.frame = frame; [button setbackgroundimage:image forstate:uicontrolstatenormal]; [button addtarget:self action:@selector(accessorybuttontapped:) forcontrolevents:uicontroleventtouchupinside]; button.backgroundcolor = [uicolor clearcolor]; cell.accessoryview = button; return cell; }
Comments
Post a Comment