Author Archives: keefo

CATweaker – an Xcode plugin for creating beautiful CAMediaTimingFunction curve

CATweaker

https://github.com/keefo/CATweaker

AppIcon256

Overview

A helper tool for creating beautiful CAMediaTimingFunction curve.

alt Window

CATweaker come with an Xcode plugin:

CATweakerSense for Xcode

Overview

CATweakerSense is an Xcode plugin that makes working with CAMediaTimingFunction more visual.

You might use ColorSense before. It let you pick up a color right from Xcode caret.

CATweakerSense is like ColorSense, but it lets you pick a CAMediaTimingFunction curve. When you put the caret on one of your CAMediaTimingFunction, it automatically shows the actual time curve as an overlay, and you can even adjust it on-the-fly with the curve adjuster.

The plugin also adds some items to the Edit menu to enable and to disable CATweakerSense temporarily. These menu items have no keyboard shortcuts by default, but you can set them via the system’s keyboard preferences (Xcode’s own preferences won’t show them).

alt Xcode Plugin

alt Xcode Plugin

Installation

Install via Alcatraz.

Or

Simply build the Xcode project and restart Xcode. The plugin will automatically be installed in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins. To uninstall, just remove the plugin from there (and restart Xcode).

If you get a “Permission Denied” error while building, please see this issue.

This is tested on OS X 10.9.2 with Xcode 6.2.

Limitations

  • It only works for constant point value, something like [CAMediaTimingFunction functionWithControlPoints: abc/def : 0.1 : 0.15 : 0.9]; won’t work.

Next move

I am planing to bring keyFrame animation into this plugin. So one can create more complex animation like “spring”, “decay”, “path” through the popover adjuster. If you have some great ideas, I am more than happy to hear from you.

Credits

This work is derived from the awesome ColorSense plugin of Ole Zorn(@olemoritz). Thanks Ole!

Author

Xu Lian

I’m a Mac and iOS developer, the founder of Beyondcow, follow me on Twitter or Github.

License


XPC Service and NSTableView

Populating a NSTableView with a large amount of internet images isn’t a new problem. It may sound trivial and straight, but I see many programmers didn’t really solve it correctly. This article will introduce the correct structure for this problem and also make it as a XPC service. As the Apple document state, the two main reasons to use XPC services are privilege separation and stability. Since accessing a network resource can be slow and unstable, the XPC service is perfect for this job.

Continue reading

谨慎使用 OSX 下多触点技术

我收到过很多用户建议,软件 “这里”,“那里” 如果使用触摸板操作会多么多么非常方便。还给我支招,不同的手势操作应该出现什么操作反馈。

iOS 的多触点技术已经非常成熟, 相比较 OSX 下面的多触点技术则处于原始状态。系统提供的 API 有一些致命的 bug。这篇文章希望给所有 OSX 开发者一个提醒,不要轻易增加多触点功能。触摸板不是触摸屏!很多移动端的手势操作不是搬过来就是适合的。
Continue reading

10个迷惑新手的Cocoa&Objective-c开发问题

  1. language background
  2. run­time
  3. thread
  4. run­loop
  5. protocol, del­e­gate
  6. event respon­der
  7. mem­ory management
  8. class heritage, category and extensions
  9. drawing issue
  10. design pattern

首先请谅解我可能使用很多英文,毕竟英文资料将来会是你的主要资料来源。

这篇教程将描述一些我见到的众多Cocoa开发新手遇到的问题和障碍。并不会手把手教你:“这个函数什么意思,哪个函数如何使用”,而是站在一定高度,统观各种技术所处的角色,让你不会迷失在各种技术细节中。在你继续深入学习MacOS编程之前,请停下脚步看清楚这些问题。如果你是新手,这个教程不要希望一次能看的非常透彻,学一定阶段反回来再看看又会有新的体会的。

Continue reading