你希望你在2年前知道什么Cocoa / Core Foundation帮助函数? [英] What Cocoa/Core Foundation helper functions do you wish you knew about 2 years ago?

查看:105
本文介绍了你希望你在2年前知道什么Cocoa / Core Foundation帮助函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在NSGeometry.h中发现了NSRect辅助函数(即NSMidX,NSMaxX等)

I just discovered the NSRect helper functions in NSGeometry.h (i.e. NSMidX, NSMaxX, etc...)

这些会使一些重复的编码更容易。我知道NSMakeRect,NSMouseInRect,NSOffsetRect和许多其他,但不知何故错过了帮助重新计算NSRect几何的功能。

These would have made some repetitive coding much easier. I knew about NSMakeRect, NSMouseInRect, NSOffsetRect and many others but somehow missed the functions that aid in recalculating NSRect geometry.

推荐答案

ve找到NSStringFrom *()在记录结构如CGRect,CGPoint等时有用。

I've found NSStringFrom*() helpful when logging structs like CGRect, CGPoint, etc.

您可以在Apple的基础函数参考

You can find a comprehensive overview at Apple's Foundation Functions Reference.

这篇关于你希望你在2年前知道什么Cocoa / Core Foundation帮助函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆