Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anything you do not understand is inherently hard.

The only thing i would say is uniquely hard about Objective C is getting your head around some of the APIs, but then again that can apply to any language.



To me the hardest thing is the seemingly arbitrary CG functions in Quartz2D and why they're so interspersed throughout the code. If I'm writing within the UIKit most of the time, and then have to make my own UIView for some custom drawing, I have a hell of a time remembering how, and always have to reference my earlier code, which I usually find on StackOverflow or somewhere else.

Example, let's draw a line and an ellipse in drawRect:

CGContextRef ctx = UIGraphicsGetCurrentContext(); //CGMove the point somewhere? //CGLineTo something //CGDrawEllipseInRect or something //stroke or fill? CGFillSomething maybe? //do i need to end the context?

Maybe it's a mental block on my part, but I can _never_ remember how to do this and always have to look it up, probably because it's not part of the standard UIKit and not used on daily basis. I guess I would just like to see the Quartz stuff conform more to UIKit naming conventions (but because it's based in C, I understand why it's not)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: