ios - disclosure indicator moves cell subviews -
i have table cells using disclosure indicator , not.
obviously disclosure indicator scrunches contents not of cells line in perfect columns.
how can adjust contents stay in same location regardless of there being disclosure indicator or not?
one trick solve issue create empty view , use cell's accessoryview
. cells don't have detail disclosure.
the trick setting size of view properly. little trial , error should it.
in cellforrowatindexpath:...
method:
uitableviewcell *cell = ... // cell if (/* there no detail disclosure */) { // try different "width" value view desired results uiview *view = [[uiview alloc] initwithframe:cgrectmake(0, 0, 10, 40)]; cell.accessoryview = view; }
Comments
Post a Comment