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
Post a Comment