title: UIPickerview AppDelegate problem with subviews
body: <p>Issue with subviews but it may be related to the AppDelegate with respect to placing a UIPickerView in myView as apposed to self.view?</p>
  
  <p>Thanks</p>
  
  <pre><code>[self.view addSubview:pickerView]; &lt;-- works ok
  //[myView addSubview:pickerView];&lt;-- fails, can't get dial movement or response
  </code></pre>
  
  <p>AppDelegate.h</p>
  
  <pre><code> #import &lt;UIKit/UIKit.h&gt;
  @class PickerViewController;
  @interface PickerViewAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {
      UIWindow *window;
      PickerViewController *pvController;
  }
  @property (nonatomic, retain) IBOutlet UIWindow *window;
  @end
  </code></pre>
  
  <p>AppDelegate.m</p>
  
  <pre><code>#import "PickerViewAppDelegate.h"
  #import "PickerViewController.h"
  @implementation PickerViewAppDelegate
  @synthesize window;
  - (void)applicationDidFinishLaunching:(UIApplication *)application {    
      pvController = [[PickerViewController alloc] initWithNibName:@"PickerView"    bundle:[NSBundle mainBundle]];
      [window addSubview:pvController.view];
       // Override point for customization after application launch
      [window makeKeyAndVisible];
  }
  - (void)dealloc {
      [pvController release];
      [window release];
      [super dealloc];
  }
  @end
  </code></pre>
  
  <p>Controller.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  @interface PickerViewController : UIViewController &lt;UIPickerViewDataSource,     UIPickerViewDelegate&gt; {
      IBOutlet UIPickerView *pickerView;
      NSMutableArray *arrayColors;
  }
  @end
  </code></pre>
  
  <p>Controller.m</p>
  
  <pre><code>#import "PickerViewController.h"
  @implementation PickerViewController
  // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
  - (void)viewDidLoad {
      [super viewDidLoad];
      UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0, 100, 100, 100)];
      [myView setBackgroundColor:[UIColor blueColor]];
      [self.view addSubview:myView];
      UIPickerView *pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 100.0)];
      pickerView.delegate = self;
      pickerView.showsSelectionIndicator = YES;
      arrayColors = [[NSMutableArray alloc] init];
  
      for (int i=0; i&lt;60; i++) {
          [arrayColors addObject:[NSString stringWithFormat:@"%d", i]];
      }
      //[self.view addSubview:pickerView]; // &lt;-- works
      [myView addSubview:pickerView]; // &lt;-- this fails.. this is what I need for multiple views
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
      // Release anything that's not essential, such as cached data
  }
  
  
  - (void)dealloc {
      [arrayColors release];
      [super dealloc];
  }
  
  #pragma mark -
  #pragma mark Picker View Methods
  
  - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView {
      return 1;
  }
  
  - (NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component {
      return [arrayColors count];
  }
  
  - (NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
      return [arrayColors objectAtIndex:row];
  }
  
  - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
      NSLog(@"Selected Color: %@. Index of selected color: %i", [arrayColors objectAtIndex:row], row);
  }
  @end
  </code></pre>