
Untitled
By: a guest on
Apr 4th, 2012 | syntax:
Objective C | size: 0.63 KB | hits: 39 | expires: Never
void logNumbers() {
int start = 1, end = 10;
for (int index = start; index <= end; index++) {
NSLog(@"%d", index);
}
}
void logAlphabets() {
int start = 65, end = 90;
for (int index = start; index <= end; index++) {
NSLog(@"%c", index);
}
}
-(void) viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
dispatch_queue_t aQueue;
// Get the global concurrent queue.
aQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async_f(aQueue, NULL, logNumbers);
dispatch_async_f(aQueue, NULL, logAlphabets);
}