In a seemingly never ending effort to learn more about iphone development, I have been playing around with some of the source code available through apples developer website
Steve, I'm sorry if I misunderstood your question. Did you actually create the UISwitch and add it to the view hierarchy? Your controller's -loadView or -viewDidLoad implementation should have code like the following:
// Use the ivar here
onoff = [[UISwitch alloc] initWithFrame: CGRectZero];
[onoff addTarget: self action: @selector(flip:) forControlEvents: UIControlEventValueChanged];
// Set the desired frame location of onoff here
[self.view addSubview: onoff];
[onoff release];