xcode4 - Adding a subview of one xib file to another xib file in objective c -


i have header view in 1 of xib file.i want reuse header view in other views header.can add subview?anyone have tried this?i tried following code , found not working

 claimedpagetemplateone *  claimedtemplateone=[[claimedpagetemplateone alloc]initwithnibname:@"claimedpagetemplateone" bundle:[nsbundle mainbundle]]; claimedtemplateone.delegate=self; [ headerview addsubview:claimedtemplateone.background ]; 

where "claimedpagetemplateone" view having header,"background" synthesized header view have reuse,and "headerview" view need add subview. in advance.

try copy uiview 1 xib , paste xib in interface builder.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -