在.h中+ (shareInstance*)sharedManager; .m中+ (shareInstance*)sharedManager {staticshareInstance*sharedAccountManagerInstance =nil;staticdispatch_once_tpredicate;dispatch_once(&predicate, ^{sharedAccountManagerInstance = [[selfalloc]init];});returnsharedAccountManagerInstance;}