iphone - Problem with Custom accessoryView in UITableView -
i have 2 table views following declarations.
caboutus = [[uitableview alloc] initwithframe:cgrectmake(85, 272, 227, 30)]; ctableview = [[uitableview alloc] initwithframe:cgrectmake(85, 302, 227, 100)];
when try add custom accessory view using below code, both comes @ different locations in cell. (in caboutus more towards left(x) when compared ctableview cell accessory)
uiimage *image = [uiimage imagenamed:@"bullet.png"]; uibutton *button = [uibutton buttonwithtype:uibuttontypecustom]; cgrect frame = cgrectmake(0.0, 0.0, image.size.width, image.size.height); button.frame = frame; [button setbackgroundimage:image forstate:uicontrolstatenormal]; cell.accessoryview = button;
i tried same using
cell.accessorytype = uitableviewcellaccessorydisclosureindicator
it shows aligned.
please me in solving bug.
it solved increasing height of caboutus table cell 40. strange no reason why solved.
Comments
Post a Comment