What Cocoa/Core Foundation helper functions do you wish you knew about 2 years ago?

前端 未结 7 1090
自闭症患者
自闭症患者 2021-01-31 00:20

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

These would have made some repetitive coding much easier. I knew about NSMak

7条回答
  •  孤城傲影
    2021-01-31 00:46

    One I remember

    + (NSBezierPath *)bezierPathWithRoundedRect:(NSRect)rect xRadius:(CGFloat)xRadius yRadius:(CGFloat)yRadius
    

    Granted figuring out how to draw a rounded rectangle manually is a pretty good exercise. There are others that I am just so used to now.

提交回复
热议问题