My question is quite basic, I guess. When we create an instance of a viewController in another viewController, it is whose instance that we create? Is it of viewController.h or viewController.m?
What I have learned is, interface cannot be instantiated. Thus, .h cannot be instantiated. So, is it .m that we instantiate?
In Objective-C a class should contain both interface(.h) and implementation(.m) files. Both the interface and the implementation comprises a class in a typical MVC architecture. Interface is an interface(literally) to a class using which we get access to the class.
If you keep the interface in .h file, you can import the .h file from other classes and use its properties and methods by instantiating the class. If you write the interface in .m file then that class will be accessible from that particular .m file alone. Note that we can import .h files not .m files.