When using NSTokenField , something strange happens, as shown in the figures below:
Entering A displays a selection from a popup window.

I scrolled it

A few more scrolls, and he sank below the visible area.

This is a behavior with all table views. The view behind the lines is visible, but it automatically returns to its normal position. But not in this case.
This is normal in the Mail application, it works fine.
My implementation:
Created by NSTokenField .
Set its delegate to AppDelegate.
In the implementation file
-(NSArray *)tokenField:(NSTokenField *)tokenField completionsForSubstring:(NSString *)substring indexOfToken:(NSInteger)tokenIndex indexOfSelectedItem:(NSInteger *)selectedIndex{ return @[@"A",@"B",@"C"]; }
Even the sample code from the Apple documentation behaves incorrectly.
How can I do this auto-spring or restrict to some code?
source share