I have a normal header and common footwork in all view controllers of an iPhone application. What I want to do is, And I want to separate the footer into different essays, .h and .m files and integrate them into one view.
How to do this
Thanks all
UIViewController can create:
- HeaderViewController with .m (.h and .xib)
- FooterViewController.m (with .h and .xib)
Then you add them to the code by looking at: (or, if you want, via the interface builder)
header view controller * header = [[headerviewer controller] Init]; [Header setframe: CGRactam (0,0, 320, 100)]; // for example [self.view addSubview: header.view]; In IB: Add a new UIViewController to IB, replace Classe UIVIEController by HeaderViewController, link it to a
IBOutlet (header), then you just have to do
[self.view addSubview: header. View]; .
Comments
Post a Comment