adamwulf / JotUI

OpenGL based drawing view built for and used by Loose Leaf for iPad
http://getlooseleaf.com/opensource/
MIT License
268 stars 28 forks source link

[UIDeviceWhiteColor getRGBAComponents:]: unrecognized selector sent to instance 0x170443b70' #8

Closed KrLikeblue closed 7 years ago

KrLikeblue commented 7 years ago

I implemented necessary files and JotUI.framework in my project.

Now when i try to draw line in jotview, I got error like below

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDeviceWhiteColor getRGBAComponents:]: unrecognized selector sent to instance 0x170443b70'

Here is my code: if (!jotView) { jotView = [[JotView alloc] initWithFrame:self.view.bounds]; jotView.delegate = self; // jotView.backgroundColor = [UIColor whiteColor]; // [_scrSketch insertSubview:jotView atIndex:0]; [_scrSketch addSubview:jotView]; _scrSketch.minimumZoomScale = 1.0; _scrSketch.maximumZoomScale = 10.0;

    JotViewStateProxy* paperState = [[JotViewStateProxy alloc] initWithDelegate:self];
    paperState.delegate = self;
    [paperState loadJotStateAsynchronously:NO withSize:jotView.bounds.size andScale:[[UIScreen mainScreen] scale] andContext:jotView.context andBufferManager:[JotBufferManager sharedInstance]];
    [jotView loadState:paperState];
     [self activePen].color = [UIColor blackColor];
    [self activePen].minSize += 10;
    [self activePen].maxSize += 10;

}

Any idea ?? Thanks.

adamwulf commented 7 years ago

Try adding "-all_load -ObjC" to "Other Linker Flags" in the project's settings.

KrLikeblue commented 7 years ago

Thanks Man. It worked :)