2

我无法确定当前是否将滚动设置为反向模式,我想显示该设置并将其用于滑块和其他东西。

我知道我可以检查一下 plist:

dict = open("/Library/Preferences/.GlobalPreferences.plist");
=> dict.objectForKey("com.apple.swipescrolldirection");

我在这里寻找任何 API。

4

2 回答 2

4

我刚才遇到了同样的问题,我是这样解决的:

用 Catfish_Man 的建议编辑:

NSString *scrollDirection = [[[NSUserDefaults standardUserDefaults] objectForKey:@"com.apple.swipescrolldirection"] boolValue]? @"Natural" : @"Normal";
于 2012-10-30T00:20:46.867 回答
3

我想你正在寻找 上的isDirectionInvertedFromDevice房产NSEvent

于 2012-10-30T00:25:44.780 回答