This is another "I'm confused question". So I'm working on bringing in custom views into a view controller. I'll just outline the exact steps for the error.
- Create a Single View Application Project
- Create a Nib File via File -> New -> User Interface -> View; call it theNIB.xib. Add a simple label to make sure loading.
add following code:
UIView *view = [[[NSBundle mainBundle] loadNibNamed:@"theNIB" owner:self options:nil] objectAtIndex:0]; view.frame=CGRectMake(10.0f,10.0f,100.0f,100.0f); view.backgroundColor=[UIColor orangeColor]; [self.view addSubview:view];
This works.
Now what I want to do is connect this nib with a UICustomView so I create ArcView via File -> New -> UIView.
'4. In IB, I need to connect theNIB to ArcView so I highlight the File's Owner in the Placeholders and select AcrView in the Custom Class.
'5.' Then I select the main View and set it to ArcView in the Custom Class.
I am at a loss for what the next step is or whether 4 or 5 were necessary (both / neither)? Do I try to make an outlet reference in ArcView to view for the main View in Interface Builder? Should I be able to Alt-drag from the View to the header file in assistant editor (I am not currently able to)?
thx in advance
** edit 1 **
Here's the File's Owner with arcView set:
View object with arcView not set: