Xojo 2018 r2 added animation to inserting and removing iOSTable rows. Has anyone worked out how to suppress that animation?
It should only animate if you are inserting or removing a row. If you refresh the data source, it should not happen.
Thanks, Greg. I usually use a data source for my iOSTables, but in this case I’ve got one that doesn’t use a data source so I’m inserting rows with my own code.
I’m currently assuming that the answer is “there’s no way to suppress the animation other than using a data source”.
[quote=435097:@Tom Catchesides]Thanks, Greg. I usually use a data source for my iOSTables, but in this case I’ve got one that doesn’t use a data source so I’m inserting rows with my own code.
I’m currently assuming that the answer is “there’s no way to suppress the animation other than using a data source”.[/quote]
Not necessarily. If you remove all rows first and re-add them, does it still animate?
Yes. If I do RemoveAll followed by a series of AddSection and AddRow calls, the cells animate as they’re added.
Hm. Im sure we planned a way to do this… I just cant remember off the top of my head.
Actually it animates even using a data source if you need to reload the data source for any reason (such as some data has changed) so it would be good to have a way to switch this off when you just want a quick change.
I believe there is still no way to turn off the animation when all items are removed and added to a table, right?
Would there be any other way to update information in existing iOSTableCells which were added to the table using AddRows?
[code]//Stop animations
Declare Function NSClassFromString Lib “Foundation.framework” (className As CFStringRef) As Ptr
Declare sub setAnimationsEnabled lib “UIKit.framework” selector “setAnimationsEnabled:” (obj as ptr, value as boolean)
setAnimationsEnabled(NSClassFromString(“UIView”), False)
//Do something in the table
//Allow animations
setAnimationsEnabled(NSClassFromString(“UIView”), True)
[/code]
Awesome, works like a charm! Thank you!
[quote=488046:@Jeremie Leroy][code]//Stop animations
Declare Function NSClassFromString Lib “Foundation.framework” (className As CFStringRef) As Ptr
Declare sub setAnimationsEnabled lib “UIKit.framework” selector “setAnimationsEnabled:” (obj as ptr, value as boolean)
setAnimationsEnabled(NSClassFromString(“UIView”), False)
//Do something in the table
//Allow animations
setAnimationsEnabled(NSClassFromString(“UIView”), True)
[/code][/quote]
When do you get a job entry @Xojo?
No need for a job, I’m thrilled being my own boss for the past three years
If there was a single repository for all the ios stuff it would be more managable to having more ios features. Wouldn’t it be an idea to push the changes to ioskit for example?