The pattern is to put a single public interface into the .h file:
@interface FirstViewController : UIViewController
// in here put those public properties and method declarations that
// other classes need to have access to
@end
Then put the second @implementation
in the .m file as a private class extension:
@interface FirstViewController () <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
// in here, place those private properties and instance variables that
// only this class needs to be aware of
@end
Note, this second interface uses the ()
syntax, which indicates that the interface is extending a previously defined interface.
But there's no point in putting both of those interfaces in the same .h file (why have two interfaces; it would be more logical to combine them into one). The primary value of the private class extension is you can extend your interface with details that only the implementation cares about, and avoid cluttering your nice simple public interface. So generally, keep public interface in the .h file, and move the private stuff into the class extension in the .m file.
For more information, see Class Extensions Extend the Internal Implementation.