Re: Understanding the docs. UIApplication for iOS
Re: Understanding the docs. UIApplication for iOS
- Subject: Re: Understanding the docs. UIApplication for iOS
- From: Bill Garrison <email@hidden>
- Date: Mon, 03 Jun 2013 15:19:58 -0400
On Jun 3, 2013, at 1:49 PM, Alex Zavatone <email@hidden> wrote:
> What I'm used to in Apple's iOS class reference docs are listings at the top of the file that specify the objects inherited from and protocols conformed to.
>
> I'm either missing something with UIApplication, or the docs are.
>
> Referring to this class reference document:
> https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html
>
> It's not listed that the UIApplication class conforms to the UIApplicationDelegate, but it is mentioned that the delegate exists and is "defined" by the UIApplication.
>
> In fact, in the .h file, it obviously extends UIResponder to conform to the UIApplicationDelegate, but you actually can't tell this by eyeballing the docs. It's not listed at all until you read the overview.
>
> Shouldn't this be included in the "Conforms to" section at the top of the class reference, while stating that it is conformed to through an extension to UIResponder?
>
> It just seems odd that a fundamental part of UIApplication (the delegate protocol) isn't mentioned in area of the doc that normally lists it.
>
> If this is a doc bug, I'll gladly report it, but I'd like to make sure it's not my oversight first.
>
> Thoughts?
Alex,
Not a doc bug.
UIApplication doesn't conform to UIApplicationDelegate. The shared instance of UIApplication, though, is the grand poobah object that ensures that UIApplicationDelegate methods get invoked and that all application lifecycle notifications get posted at the appropriate times.
You *could* write a working iOS application without implementing any UIApplicationDelegate compliant class. Subclass UIApplication and have it do the things that an app delegate would do by writing handlers for all the application notifications that get broadcast. This would be a great learning exercise, and you would come to fully appreciate the value of the UIApplicationDelegate object.
The docs are correct, though. UIApplication doesn't implement any of the UIApplicationDelegate defined methods, so it doesn't conform to the protocol.
Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden