I’ve created new Single View project in Xcode. In ViewController.xib I’ve added new custom view inside another view. (grey rectangle)

Then I’ve created new files: “CoordinateSystemViewController”.

Now, I want to init my custom view with CoordinateSystemViewController.xib.
I’ve tried (ViewController.m file):
- (void)viewDidLoad
{
[super viewDidLoad];
CoordinateSystemViewController *coordinateSystemViewController = [[CoordinateSystemViewController alloc] initWithNibName:@"CoordinateSystemViewController" bundle:nil];
coordinateSystemView = coordinateSystemViewController.view;
}
but it seems to be the wrong way because it doesn’t work 😛
Should I always create ViewController for each file?
Should every view be loaded from separate .xib file?
Is it a good habit to create one View Controller class with few views’ IBOutlets which manages them all?
Inorder to use another UIView inside Controller , We do not need to use another controller for it. Instead manage UIView inside same Controller.
Refer to this for more Information.