tag:blogger.com,1999:blog-9109010163420737861.post2870020752776574121..comments2023-09-17T01:22:52.860-07:00Comments on An Obsession With Programming: Real-World iPhone Rotation, Part 1Derrickhttp://www.blogger.com/profile/05974720556627635894noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-9109010163420737861.post-465612903508599022010-03-22T10:23:50.321-07:002010-03-22T10:23:50.321-07:00Matt,
Good point. I hadn't really learned abo...Matt,<br /><br />Good point. I hadn't really learned about categories when I first wired this up, and even now I mostly think of them as a way to do private methods and add functionality, rather than overriding existing functionality. I'll definitely keep that in mind!<br /><br />Thanks!Derrickhttps://www.blogger.com/profile/05974720556627635894noreply@blogger.comtag:blogger.com,1999:blog-9109010163420737861.post-84350140169342969602010-03-22T10:21:09.535-07:002010-03-22T10:21:09.535-07:00Hi,
you can use a Category instead. This allows yo...Hi,<br />you can use a Category instead. This allows you to override only one method from a class. For example in this tutorial, you could use the following category for your Tab bar controller :<br /><br />@implementation UITabBarController (Orientable)<br />// Override to allow orientations other than the default portrait orientation.<br />- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br /> // Return YES for supported orientations<br /> return YES;<br />}<br />@endMattnoreply@blogger.comtag:blogger.com,1999:blog-9109010163420737861.post-24771694320531795512009-06-25T01:35:36.664-07:002009-06-25T01:35:36.664-07:00Do we really need to subclass UITabBarViewControll...Do we really need to subclass UITabBarViewController just for that? :)<br /><br />Kindly let us know if you find an alternative solution. <br /><br />Thank you very much!Paulhttp://unlikelyteacher.comnoreply@blogger.com