cocoa - making insertRowAtIndexes:withAnimation visible when inserting new row at end -


i'm using insertrowatindexes:withanimation add new row nstableview.

if rect of new row visible works fine there problem when inserting new row @ end. row gets inserted expected since scroll position doesn't adjust, animation happens offscreen!

any obvious fix i'm missing?

you have make new row visible manually. can't call -rectofrow: on row inserting, because it's not in table yet -- instead, @ rect of last row in table, add expected height of new row, , see if resulting rect visible onscreen; if not, need scroll.

see nstableview scrollrowtovisible animation if want animate scroll. note on 10.7+ want call -flashscrollers on scrollview well.


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -