gazolla / ColorPopover

A ColorPopover is a very simple component for iPhone/iPad that provides a "Popover" color picker.
164 stars 44 forks source link

Conflicts with UIImagePickerController on iOs7 #8

Open superandrew opened 10 years ago

superandrew commented 10 years ago

When I instantiate the popover and after that I load a UIImagePickerController, the camera looks black for about 30 seconds or more.

I've made some changes on code (method loadColorButtons )which makes it work:

  1. instead of using myQueue

    dispatch_queue_t myQueue = dispatch_queue_create("com.gazapps.myqueue", 0);

I am using

dispatch_async(dispatch_get_main_queue(), ^{...
  1. In the same method, in the loop, instead of starting another queue, I replaced with this:

    //dispatch_sync(dispatch_get_main_queue(), ^{ [self.buttonCollection addObject:colorButton]; [scroll addSubview:colorButton]; //});//end block

It works just fine.