如何检查OSX与可可API的滚动方向 [英] How to check scrolling direction of OSX with cocoa APIs

查看:347
本文介绍了如何检查OSX与可可API的滚动方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找出滚动是否设置为倒转模式或当前没有..我想显示该设置,也用于滑块和东西。

I can't find out if scrolling is set to reverse mode or not currently.. and I want to show that setting and also use this for sliders and stuff.

我知道我可以检查只检查plist:

I know I can check just check the plist :

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






我在这里寻找任何API? / p>


I am looking for any API here!?

推荐答案

我想您正在寻找 isDirectionInvertedFromDevice NSEvent 上的code> 属性。

I think you're looking for the isDirectionInvertedFromDevice property on NSEvent.

这篇关于如何检查OSX与可可API的滚动方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆