views:

24

answers:

2

Hi guys.

I created a subclass of an UIView called smartView. Then I created a NSInteger parameter viewID.

Now in the IB I change the class of a standard UIView to my smartView.

My question is how can I supply a value for my viewID parameter in IB?

Is it possible? If not, is there another way besides "Tag" parameter to give a UIView component a unique id?

A: 

I think the way to supply that value in IB would be to create a IB Plug-in.

See here for a tutorial, and here for the Apple Reference Document.

MattLeff
Hey, thx, for answer but unfortunetly you can not do IB Plug-in's for the iPhone. At least not yet.
Cyprian
A: 

If you provide an IBOutlet for your smartView in the view controller then you can access it like:

self.mySmartView.viewID = _viewID;
smstromb
Yep I will probably use that although I wanted to go with the IB entirely without codeing in ViewController
Cyprian