ibireme / YYText

Powerful text framework for iOS to display and edit rich text.
MIT License
8.84k stars 1.69k forks source link

Why call `[self defaultManager]` in `+ load` method? #879

Open iCodeWoods opened 5 years ago

iCodeWoods commented 5 years ago

Doing so may affect startup performance

// YYTextKeyboardManager.m
+ (void)load {
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self defaultManager];
    });
}