please can anyone help me? I have next problem. I created custom keyboard in xcode and want to use the GCD to load gifs async in array. But when i do this my app crash. My code
@implementation KeyboardViewController
in viewDidLoad ()
dispatch_queue_t myQueue = dispatch_queue_create("identifier", NULL);
dispatch_async(myQueue, ^{
@synchronized (self.gifsArray){
@autoreleasepool {
for (int i = 0; i < NUMBER_OF_GIFS; i++) {
FLAnimatedImage *gifImage = [[FLAnimatedImage alloc] initWithAnimatedGIFData:[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%i", i] ofType:@"gif"]]];
[self.gifsArray addObject:gifImage];
}
}
}
});