Ok so I started with properties but that was an issue also. Here is why.
This is how I declare Setup in the .h of my main view controller:
I @class Setup so that this is possible.
Then I setter/getter it like so:
Code:
@property (nonatomic, assign) Setup *sp;
@synthesize sp;
Now this is actually how I add the subview:
Code:
[UIView animateWithDuration:0.3
delay:0
options:UIViewAnimationOptionCurveLinear
animations:^{
self.sp = [[[Setup alloc] initWithNibName:@"Setup" bundle:nil] autorelease];
self.sp.mainController = self;
[self.view addSubview:self.sp.view];
[self.sp.view setFrame:CGRectMake(0, 485, 320, 480)];
[self.sp.view setBackgroundColor:[UIColor clearColor]];
[self.sp.view setCenter:self.view.center];
}
completion:nil];
But when I click on say a textfield or a segementedcontrol in the setup view, a EXC_BAD_ACCESS exception is thrown. Am I doing something wrong here?