ios - How to connect an IBOutlet to the storyboard from a class category -


i have carviewcontroller class has several class category files. carviewcontroller.m imports carviewcontroller+protected.h. want have iboutlet properties inside car+protected.h can use these in both carviewcontroller.m , other class category implementation files.

i opened assistant editor , not able drag view outlet in carviewcontroller+protected.h. however, able drag outlets in carviewcontroller+protected.h view in storyboard.

i ran code got this class not key value coding-compliant key error, means have outdated connection somewhere in project. have checked , cleaned project cannot seem past error.

is possible have iboutlets connect storyboard in class category header file? if not, can use class extension file? carviewcontroller class becoming large , want use categories or extensions break down file size , better organize code.

you can not declare properties in category, it's impossible connect iboutlet property category.

in case, making carviewcontroller super class , making subclasses inheriting class can solve problem.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -