At least two problems here
- If you are going to use
CommonCostingClassas a view, it needs to subclassUIView. In the code you're posting,CommonCostingClassis a subclass ofNSObject. That could be a typo or it could indicate a much more fundamental issue with what you're trying to do here. - You need to make sure the that
viewproperty of yourUIViewControlleris set to be an instance ofCommonCostingClass. The easiest way to do this is using Interface Builder.