Нет другой альтернативы, кроме как бросить свою.
Примерно так может работа: (не проверено)
@interface NSOperationQueue(MainQueueAdditions)
+ (NSOperationQueue *) mainQueue;
@end
@implementation NSOperationQueue(MainQueueAdditions)
+ (NSOperationQueue *) mainQueue {
static NSOperationQueue *queue = nil;
if(queue == nil) queue = [[NSMainOperationQueue alloc] init];
return queue;
}
@end
@interface NSMainOperationQueue : NSOperationQueue {}
@end
@implementation NSMainOperationQueue
- (void) addOperation:(NSOperation *) operation {
[self queueOperationInternal:operation];
}
- (void) addOperationWithBlock:(void (^)(void))block {
[self queueOperationInternal:[NSBlockOperation blockOperationWithBlock:block]];
}
- (void) queueOperationInternal:(NSOperation *) operation {
[[NSRunLoop mainRunLoop] performSelector:@selector(start) target:operation argument:nil order:-[operation queuePriority] modes:[NSArray arrayWithObject:NSRunLoopCommonModes]];
}
@end