简体   繁体   中英

cocoa: NSTextField with custom font, cursor out of wack

I have an NSTextField with a custom font set up in Interface Builder. When it loads, this is how it shows up:

开始

When the user starts typing, the cursor moves correctly

第二

And then when the user deletes the text it resets to the correct original position

第三

Any ideas why this might be happening?

尝试为文本字段及其超级视图启用CG层

.wantsLayer = YES;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM