Trackpad gesture to switch to header/source

我是研究僧i 提交于 2019-11-27 06:41:15
Todd Hopkinson

This is the correct and best answer. It works. It is posted by "@Buyin" above. Another individual commented that it doesn't work. He is wrong. It works, I've confirmed it. It restores the three finger vertical swipe to switch between interface and implementation files (.h and .m) in xCode in Lion.

From your terminal:

Change to appropriate directory (note, if your Library dir is hidden, in the terminal just type the following: chflags nohidden ~/Library )

1. cd /Users/YOURUSERNAME/Library/Preferences/ByHost

List files so you can see the .GlobalPreferences.XXXX-XXXX-XXXX-XXXX.plist

2. ls -lah

Open that plist file in xcode

3. open -a /Applications/Xcode.app ".GlobalPreferences.XXXX-XXXX-XXXX-XXXX.plist"

Set value to 1 for the key "com.apple.trackpad.threeFingerVertSwipeGesture"

Save the plist file

Log out and back into machine

VOILA!

Given apple took this away (hopefully just for now) the only way I can think of to get this working again would be to install BetterTouchTool[1] and bind the keyboard control - control-cmd-up, ctrl-cmd-down - to the three finger motion. You'd also have to switch the default three finger motion in sys prefs to use four fingers for mission control.

[1] http://blog.boastr.net/

Taras Kalapun

As found in internet:

defaults -currentHost write -g "com.apple.trackpad.threeFingerVertSwipeGesture" -int 1

Logout and Login again

If you're using an Apple magic trackpad, you'll also need to edit

com.apple.driver.AppleBluetoothMultitouch.trackpad.plist 

which can be found in the

/Users/YOURUSERNAME/Library/Preferences 

directory. Open it and change the threeFingerVertSwipeGesture key to a 1.

Save the *.plist

I also changed both my App Expose and Mission Control swipes to be 4 finder swipes instead of Lion's default 3 finger swipe.

Restart your computer

Hope that helps!

The answer from icnivad was so very close to working for me. With one additional step.

From your terminal:

Change to appropriate directory (note, if your Library dir is hidden, in the terminal just type the following: chflags nohidden ~/Library )

1. cd /Users/YOURUSERNAME/Library/Preferences/ByHost

List files so you can see the .GlobalPreferences.XXXX-XXXX-XXXX-XXXX.plist

2. ls -lah

Open that plist file in xcode

3. open -a /Developer/Applications/Xcode.app ".GlobalPreferences.XXXX-XXXX-XXXX-XXXX.plist"

Set value to 1 for the key "com.apple.trackpad.threeFingerVertSwipeGesture"

Save the plist file

Restart machine

THEN

Make sure the "Three finger drag" System Preference is disabled. This seems to take precedence and stop the Xcode gesture from working.

Looks like you can now switch using a left and right two finger swipe. Seems pretty buggy though, given that this also scrolls the screen. It also switches the butler from automatic to manual mode.

I'm starting to hate the combination of Lion and Xcode.

Apple fixed the issue in Xcode 4.2. So, upgrade your versions.

Have fun coding and mind the occasional crash.

This worked for me in Mountain Lion, XCode 4.6: a busy cat http://monosnap.com/image/iakMgffAeOtp9G04qLdsnb3v5

I think the reason Apple removed the h/m 3-finger swipe is because they expect you to use the "Assistant" editor, which displays the h and m files together, side by side. This works, sort of, on a wide screen, although it is an inefficient use of space. But when you're on the road with a MacBookAir, it's a major handicap. Xcode4 feels like a straitjacket.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!