几种简单的单利创建,只能通过指定的方法去实例化,想要实现多种实例化,则要考虑重载任何一个涉及到allocation的方法,这些方法包括 +new, +alloc,+allocWithZone:, -copyWithZone:, 以及 -mutableCopyWithZone:
iOS 单利的简单创建
最新推荐文章于 2021-08-04 19:20:15 发布
几种简单的单利创建,只能通过指定的方法去实例化,想要实现多种实例化,则要考虑重载任何一个涉及到allocation的方法,这些方法包括 +new, +alloc,+allocWithZone:, -copyWithZone:, 以及 -mutableCopyWithZone: