Il giorno 08/dic/2009, alle ore 22.19, David Duncan ha scritto:
> On Dec 8, 2009, at 12:49 PM, Aldo Armiento wrote:
>
>> But it seems that in this case I can't use my UINavigationBar subclass if I
>> instantiate a Navigation Controller programmatically, so the only way to use
>> my UINavigationBar subclass is to instantiate a Navigation Controller in IB
>> otherwise I can't change UINavigationBar class/instance, this makes sense?
>> I'm forced to use IB?
>
>
> Since we've come around to "file an ER" then an appropriate question seems to
> be what are you trying to accomplish by subclassing the UINavigationBar?
I'm drawing a navigation bar background image overriding drawRect: method. If
in Interface Builder I change Navigation Bar class from UINavigationBar to
CustomNavigationBar it works properly. How do that programmatically?
@interface CustomNavigationBar : UINavigationBar {
}
@end
@implementation CustomNavigationBar
- (void)drawRect:(CGRect)rect {
[[UIImage imageNamed:@"image.png"] drawInRect:rect];
}
@end
> --
> David Duncan
> Apple DTS Animation and Printing
>
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]