开发者

drawRect helper methods

开发者 https://www.devze.com 2023-02-22 19:09 出处:网络
Is it a good practice to divide draw开发者_开发问答Rect, for a several methods? For example, UIView class which should draw a pie chart, has a drawRect which call multiple helper methods(for instance

Is it a good practice to divide draw开发者_开发问答Rect, for a several methods? For example, UIView class which should draw a pie chart, has a drawRect which call multiple helper methods(for instance for draw a label, legend, triangle etc.).


I certainly do that. It makes it easier to understand and if necessary easy to refactor.

0

精彩评论

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