ios - How to check if class is available or not in Static lib? -


I will try to explain my problem.

I am building two LIBs homes. A & amp; rooms. From an independent house I ask to call my work. A

I have to use two two scripts in two projects, so I have to keep this room. If I do not add room to the project then A, I am not able to build the project.

The error is:

Undefined symbols for architecture "_RoomViewController", referenced from: - [ParentViewController openView:] home.a < P> Here is the class from the roomviewcontroller class. A & amp; ParentViewController is the class from home. A

I want to add code to the condition at home. To check RoomViewController , currently roomviewcontroller .

Please suggest me a way to do this. thank you in advanced.

If you want to compile the project without any error, For example, a RoomViewController + Private.h file declares the RoomViewController class.

  @interface RoomViewController: UIViewController @end @interface RoomViewController () // List of methods that you want to use - (zero) method A; - (zero) method B; @end  

Whether you link the library room to the runtime, you need to do the following:

  if ([RoomViewController class]) { // ClassroomViewController exists in the class * example = [[RoomViewController alloc] init]; } Other {// class does not exist}  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -