plot2.graphPoints = graphPointsMutableArray;
// plot2.graphPoints = @[LMGraphPointMake(CGPointMake(1, 25), @"1", @"34.5")];
If i assign plot2.graphPoints directly an NSArray it is working fine like in the line #2, but if i assign it a NSMutableArray like in the first shown above, the application gives me SIGABRT
with the following exception shown below
2018-12-04 02:53:18.079192+0500 ****[10946:258059] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSSingleObjectArrayI point]: unrecognized selector sent to instance 0x60400001f8a0'
*** First throw call stack:
(
0 CoreFoundation 0x000000011020c1cb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010f720f41 objc_exception_throw + 48
2 CoreFoundation 0x000000011028c914 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000011018f178 ___forwarding___ + 1432
4 CoreFoundation 0x000000011018eb58 _CF_forwarding_prep_0 + 120
5 Fandex 0x000000010e144823 -[LMLineGraphView drawPlots] + 1939
6 Fandex 0x000000010e13d678 -[LMLineGraphView drawRect:] + 312
7 UIKit 0x0000000111f75c49 -[UIView(CALayerDelegate) drawLayer:inContext:] + 487
8 QuartzCore 0x0000000111b380d8 -[CALayer drawInContext:] + 267
9 QuartzCore 0x0000000111a4b6cf CABackingStoreUpdate_ + 254
10 QuartzCore 0x0000000111b3e1dd ___ZN2CA5Layer8display_Ev_block_invoke + 44
11 QuartzCore 0x0000000111b37b34 -[CALayer _display] + 1701
12 QuartzCore 0x0000000111ac521f _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 655
13 QuartzCore 0x0000000111af0a14 _ZN2CA11Transaction6commitEv + 500
14 QuartzCore 0x0000000111af1760 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 76
15 CoreFoundation 0x00000001101aedb7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
16 CoreFoundation 0x00000001101aed0e __CFRunLoopDoObservers + 430
17 CoreFoundation 0x0000000110193324 __CFRunLoopRun + 1572
18 CoreFoundation 0x0000000110192a89 CFRunLoopRunSpecific + 409
19 GraphicsServices 0x0000000116ef29c6 GSEventRunModal + 62
20 UIKit 0x0000000111ea523c UIApplicationMain + 159
21 Fandex 0x000000010e1c7aff main + 111
22 libdyld.dylib 0x0000000115336d81 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
This is how i am adding object in NSMutableArray
NSMutableArray *graphPointsMutableArray = [[NSMutableArray alloc] init];
[graphPointsMutableArray addObject:@[LMGraphPointMake(CGPointMake(1, 25), @"1", @"34.5")]];