Recently I was studying the possibility of creating multiple classes in only one file, for this I created a class of UIViewController with a .xib file, the structure of the file is as follows:
MyFristViewController.h
#import <UIKit/UIKit.h>
@interface MyFristViewController : UIViewController
@end
@interface MySecondViewController : UIViewController
@end
MyFristViewController.m
@implementation MyFristViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSLog(@"Frist View Loaded");
}
@end
@implementation MySecondViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSLog(@"Second View Loaded");
}
@end
My doubt is: How does the system know that is to perform the methods contained in the class called 'MyFristViewController'?
I already tried to modify the custom class in interface builder, tried to change the position of the classes in the file and the system continues running only the existing methods inside the 'MyFristViewController' class why?