开发者

iphone+same xib for different class

开发者 https://www.devze.com 2023-03-03 19:34 出处:网络
I have开发者_高级运维 two class and in both class tableview uses custom nib file(for table cell)as well as i make IBOutlet instance of myview controller to that custom cell nib filebut i can not use s

I have开发者_高级运维 two class and in both class tableview uses custom nib file(for table cell)as well as i make IBOutlet instance of myview controller to that custom cell nib file but i can not use same nib for both class becuase i have give file owner of that xib to the myviewcontroller so when i used that one in another class it give error so any ideas so use the same xib for both the view controller?


If you want to reuse your custom table cell with multiple view controllers, check out this answer. The two methods described there let you load your custom table cell from a nib file without having to set the File's Owner to your specific controller.

0

精彩评论

暂无评论...
验证码 换一张
取 消