开发者

CoreText flip coordinates self.bounds.size.height error bounds

I am drawing text in the view with CoreText. To learn this I used a tutorial, but suddenly it uses self.bounds.size.height, in a part wher开发者_运维百科e it flips the coordinate system. When I was duplicating the code in Xcode it gave an error because 'bounds' was not a structure or union. Why is this a error and can anyone give a small but detailed explanation of why it uses bounds Thanks on forehand, Nicholas


If you placed that code inside a UIViewController subclass, it should be: self.view.bounds.size.height. Or put it in a UIView subclass like in the tutorial you followed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜