brow / leaves

A page-turning interface for iOS apps
Other
1.44k stars 332 forks source link

LeavesViewController does not use designated initializer of superclass UIViewController resulting in an infinite loop #1

Closed Rob-S closed 14 years ago

Rob-S commented 14 years ago

The init method in the LeavesViewController is not using the designated initializer of the UIViewController superclass. As a result, an infinite loop results when a subclass of LeavesViewController is loaded from a NIB.

See the documentation for [NSObject init] where it discusses how to "prevent the possibility of an infinite loop" (http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/doc/uid/20000050-init).

I forked it to http://GitHub.com/Rob-S/leaves and used the same pattern for LeavesViewController that was already being used in LeavesView. I also submitted a "Pull Request" to "brow", but I'm not sure how that works or how to check on its status.

Thanks in advance. Rob Simpson http://Lnkd.com?24

brow commented 14 years ago

Thanks, Rob. I learned something new about designated initializers today, and I've pulled in your changes.

I removed the "added by" comments because GitHub handles attribution pretty well. If that's not alright by you, let me know and we'll figure something out.

Rob-S commented 14 years ago

Thanks, Tom. Removing the attribution is fine. I wasn't quite sure how to do that (for ASF projects you put it the JavaDoc), so I'm glad you mentioned it.