I have right now a small problem with a UITextView in combination with a storyboard-driven UICollection Container; hoping someone has a good hint for me.
From the UICollectionContainer I have several cells which should contain each a text field with logging information.
When I update the UITextField with something like this
it technically work but has the awful user experience of scrolling to the top of the text.
a bit more enhanced version don't make it better ...
it still flicker and don't provide me the smooth scrolling experience I would like to have similar to the debug/console in XCode.
What's wrong with my approach ?
Another idea might be to split the logfile into several lines and make a UITable out of it; but thats quite an effort I would like to avoid. Plus not sure if nested UITables in a UICollection is a good idea
From the UICollectionContainer I have several cells which should contain each a text field with logging information.
When I update the UITextField with something like this
Code:
cell.unitLogText.text = unit.unitLog;
a bit more enhanced version don't make it better ...
Code:
if ([unit.unitLog length] > 0)
{
cell.unitLogText.scrollEnabled = NO;
cell.unitLogText.text = unit.unitLog;
NSRange range = NSMakeRange(unit.unitLog.length - 1, 1);
[cell.unitLogText scrollRangeToVisible:range];
cell.unitLogText.scrollEnabled = YES;
}
it still flicker and don't provide me the smooth scrolling experience I would like to have similar to the debug/console in XCode.
What's wrong with my approach ?
Another idea might be to split the logfile into several lines and make a UITable out of it; but thats quite an effort I would like to avoid. Plus not sure if nested UITables in a UICollection is a good idea