开发者

Apply an affine transformation to view in Interface Builder

Is it possible to apply an affine transformation to a view directly in Interface Builder? I know I can attach an outlet and assign it to the transform in code, but I'd like 开发者_如何学Gothe convenience of visually tweaking the transform in Interface Builder.


Nope. Sorry.

There are several properties that would be nice to set in IB. Occasionally Apple adds them, and then IB warns you that it's "only supported in iPhone OS 3.0 and above" or similar (I think this is the case for contentEdgeInsets on some class or other).

There's a very small chance that you can edit the XML, guess the right property name, and set it to the right string (probably whatever NSStringFromCGAffineTransform returns), but I think if it was possible, Apple would've included it.

There's a slightly larger chance that you can edit the xib, add a custom property, and use a category to override -[UIView initWithCoder:] and load your custom property. You can also write an InterfaceBuilder plugin for a custom view class which supports setting the transform in IB...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜