3 #import <Foundation/Foundation.h>
4 #import <UIKit/UIKit.h>
8 extern bool IsWildcat_;
10 @implementation UIViewController (Cydia)
24 @implementation CYViewController
26 - (void) setDelegate:(id)delegate {
34 - (void) viewWillAppear:(BOOL)animated {
35 [super viewWillAppear:animated];
37 // Load on first appearance. We don't need to set the loaded flag here
38 // because it is set for us the first time -reloadData is called.
39 if (![self hasLoaded])
47 - (void) releaseSubviews {
51 - (void) setView:(UIView *)view {
52 // Nasty hack for 2.x-compatibility. In 3.0+, we can and
53 // should just override -viewDidUnload instead.
55 [self releaseSubviews];
63 // This is called automatically on the first appearance of a controller,
64 // or any other time it needs to reload the information shown. However (!),
65 // this is not called by any tab bar or navigation controller's -reloadData
66 // method unless this controller returns YES from -hadLoaded.
75 - (NSURL *) navigationURL {
79 - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
80 return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;