How to change the size of the system cursor in a macosx cocoa app programmatically using swift or objective-c?
问题 I've tried to set it's global size using this code: -(void)setOption { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *olddict = [defaults persistentDomainForName:@"com.apple.universalaccess"]; NSMutableDictionary *newdict = [olddict mutableCopy]; [newdict setObject:@4.0 forKey:@"mouseDriverCursorSize"]; [defaults setPersistentDomain:newdict forName:@"com.apple.universalaccess"]; [defaults synchronize]; NSLog(@"Cursor size set to %@", newdict); } And I can see