In my sample project, I've got TestView.h TestView.m RBTestView.h RBTestView.m AppDelegate.h AppDelegate.m ViewController.h ViewController.m ViewController.xib
AppDelegate loads the view controller and it's xib - confirmed, as the drawRect: method in TestView does its thing (ViewController.xib's view's class is set to TestView). But when I put an NSLog in TestView.m by adding a -(void)viewDidLoad(), it never fires, and neither does the -initWithFrame: method. So what's the correct place to put initialization code for a custom UIView subclass? Or is my installation of Xcode screwed up? An NSLog() placed in ViewController.m in it's viewDidLoad method does fire, which is what I would expect. What stupid little thing am I missing here? I've also got these files: UIRBView.h // #imports Graphics.h and Polygon.h UIRBView.m Graphics.h Graphics.m Polygon.h Polygon.m UIRBView is the implementation of a custom UIView subclass (also), but it is supposed to create an instance of a Graphics object which is a handy wrapper class I wrote to make handling drawing in a view more like REALbasic. But if I can't get TestView to confirm that it's loading, I don't have a chance of confirming that my UIRBView subclass (RBTestView.h and RBTestView.m) are loading. Help! RBTestView inherits from UIRBView which inherits from UIView, and TestView inherits from UIView. When I set the view (in ViewController.xib) to RBTestView instead of TestView, it doesn't crash, but just displays the screen filled with light gray. FWIW, this is an iOS 5 project with ARC turned on. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com