iOS development experience summed up daily tips

First, open the child thread, back to the main thread:

    // asynchronous sub-thread operation 
    dispatch_queue_t globalQueue = dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ); 
    dispatch_async (globalQueue, ^ { 
        NSLog ( @ " child thread " );
         / * 
         * the Add Child Thread ON code 
         * / 

        // return to the main thread 
        dispatch_async (dispatch_get_main_queue ( ), ^ ( void ) { 
            NSLog ( @ " main thread " );
             / * 
             * main thread ON the Add code 
             * / 
        }); 
    });

Two, label and other controls in the settings dynamically changing the font. Such as: When downloading changes from 0.00% to 100.00%, because some fonts dynamically change the line spacing between fonts, all looks very ugly. Need to change the font: Helvetica Neue font, it does not change the spacing between fonts.

 

Guess you like

Origin www.cnblogs.com/liuhuakun/p/11198752.html