In my project I have a view (defined in a xib) that is a reusable component and will be places in many other views, I have my view controller class designed to handle different modes for this view.
My apps have 3 tabs basically use this same view, by initialize with different parameters they work pretty nice. I load this view from the Interface Builder (by specify the NIB name and class name), but I will have to pass different parameters so my view controller will know which mode it is.
I am wondering can I define some ‘parameter’ from Interface Builder, so my view controller class can simply look up and determinate itself. So I don’t need to write any additional code to reuse this nib in many different places?
I end up use the “title” to pass a json string and it works for me pretty well, I am not sure if there is a better way to do so.