How to subclass UIApplication?

前端 未结 4 1452
清酒与你
清酒与你 2020-11-30 10:27

The iPhone Reference Libary - UIApplication says I can subclass UIApplication, but if I try this I will get an exception:

*** Terminating app due to uncaught         


        
4条回答
  •  悲&欢浪女
    2020-11-30 10:55

    There can only be one UIApplication instance in an application, you should not initialize the one new application object, use the static method of the UIApplication:+ (UIApplication *)sharedApplication.

提交回复
热议问题