Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用以下代码(从 Xcode 文档复制)更改 OS X 应用程序中的光标:
NSCursor* c = [NSCursor pointingHandCursor]; [c set];
它没有生效,我不确定我在这里做错了什么。任何想法表示赞赏。
在 NSView 上,您可以尝试
- (void)resetCursorRects { [super resetCursorRects]; [self addCursorRect:[self bounds] cursor:[NSCursor pointingHandCursor]]; }
这也应该适用于 NSWIndow 但我没有测试过