phone Screen IOS

原文地址:http://robnapier.net/blog/phone-screen-777

Any Cocoa Developer

  • Should be able to explain the difference between foo = bar and self.foo = bar when foo is an ivar.

  • Should be able to easily explain what would cause EXC_BAD_ACCESS.

    //有些该retain的ivar,在该类的某些方法中没有retain,导致其他对象调用会引起该错误。

    //随着方法域的结束而release,导致其内在某些object成为无头苍蝇。

    //误release的array 后面再添加数据进去  

  • Should know what happens if you send a message to nil.

  • Should be able to explain the MVC paradigm, and describe how to break down a simple problem into Models, Views and Controllers. Pay special attention to how they develop Model classes.

  • (iOS) Should be able to explain the use of UITableView.

  • (iOS) Should be able to explain at least one way to fade-out a view that does not involve an NSTimer.

  • Should know the difference between a view and a layer, and how the two relate to each other.//个人理解,view好比是一幅画,你把它拿出来展示前,要用drawRect去画,而layer则是盖在这幅画上的一张透明纸,你可以通过这张透明纸的改变来改变你看的view的感觉,而不用重新再画一遍view

  • Should be able to explain a retain loop and how to prevent them.//delegate 的属性如果是strong的话,那么比如我是A,我创建了B,并且把自己设为B的delegate,既B.delegate = A(self);那么当我dealloc A的时候,因为B还有A,所以A是无法被dealloc掉的。

  • Should be able to explain a retain loop caused by a block capturing self. They should be able to describe at least one way to address this problem.

  • Should be able to explain what a nib file is, how it is loaded, and (iOS) the order ofUIViewController methods during creating, loading, displaying, and unloading the main view with and without a nib file (minor mistakes here are ok; but they should be familiar with the overall flow). //http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ViewLoadingandUnloading/ViewLoadingandUnloading.html#//apple_ref/doc/uid/TP40007457-CH10-SW1

  • Should be able to describe the debugging steps for the following scenario: “You have a button, an IBAction, a text field, and an IBOutlet. When you press the button, it should increment the value in the text field. However, when you press the button, the button highlights and unhighlights, but nothing else happens.”

  • (iOS) Should know how to show and dismiss the keyboard.

  • (May become an intermediate/senior topic in the future.) Should know the rules of memory management cold, including the three magic words. With the rise of ARC, this may eventually become a senior question, but in 2012 every serious Cocoa developer should still be familiar with manual memory management.

  • (OSX) Should be able to describe the responder-chain, what it is for, and generally how it works.

  • Should be able to describe the difference between the Delegate pattern and the Target-Action pattern and where you would best apply each.

Anyone Claiming to be a “Senior” Cocoa Developer

  • Should have several defensible opinions on what constitutes Cocoa “best practice.”

  • Should be able to provide information about a radar they’ve filed. Any senior developer should eventually have encountered a Cocoa bug, and a good one will have filed a radar. Extra credit for radars cross-posted to openradar.

  • Should have specific opinions and complaints about Xcode. Anyone without specific complaints about Xcode hasn’t used it very much. Extra credit for radars opened against Xcode.

  • Should know the Core Foundation memory management rules and should be able to explain what “toll-free bridging” is.

  • Should know how to correctly use __bridgeCFBridgingRetain(), and CFBridgingRelease().

  • (iOS) Should be able to explain several circumstances in which an application may run in the background. In particular, they should be able to explain how to manage long-running operations and when this should be used.

  • (iOS) Should be able to explain the use of UIGestureRecognizer and give several reasons that a recognizer might not fire when expected.

  • Should be able to name several Frameworks outside of Cocoa. Specifically, they should be familiar with at least one Framework that does not link by default and they need to add to their project (any serious developer will have encountered this problem).

  • Should know how to apply perspective to CALayer. Extra credit if they can explain the difference between a normal layer and a transform layer.

  • Should be able to explain an NSInvocation, at least to the level of how you would use one.

  • Should be able to explain generally KVO’s implementation. In particular, “when you call a setter on a KVO observed object, willChangeValueForKey: is called automatically, even though it’s not in the setter code. How is this achieved?”

  • Should be able to design a thread-safe accessor using GCD. Extra credit if it allows simultaneous readers and does not block writers. (Explanation of the basic approach is fine. I dislike on-the-spot coding, even when the developer is onsite.)

  • Should be able to explain run loops, why you might manually process one (i.e.runMode:beforeDate:), reasons you might manually process the main run loop and what dangers that might create.

  • Should be familiar with several approaches to debugging memory crashes and leaks, including NSZombiesEnabled and malloc debugging. Should be able to describe generally how each of these works.

posted @ 2012-08-22 15:46  sayALittle  阅读(297)  评论(0编辑  收藏  举报
点击这里给我发消息