iPhone check for a constant at runtime in universal app

Posted by joshue on Stack Overflow See other posts from Stack Overflow or by joshue
Published on 2010-04-28T03:41:58Z Indexed on 2010/04/28 3:43 UTC
Read the original article Hit count: 279

Filed under:
|
|

I'm making a universal iPad/iPhone app which can use the iPad's VGA out connector to mirror the content of the app on an external screen. However, the iPhone does not have this functionality. given the following code,

[[NSNotificationCenter defaultCenter] addObserver:self
         selector:@selector(screenInfoNotificationReceieved:) 
          name:UIScreenDidConnectNotification
           object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenInfoNotificationReceieved:) name:UIScreenDidDisconnectNotification object:nil];

I get this error on the phone at launch (works fine in ipad) "dyld: Symbol not found: _UIScreenDidConnectNotification"

presumably because UIScreenDidConnectNotification doesnt' exist yet in 3.13. How do I check for this at runtime?

© Stack Overflow or respective owner

Related posts about universal

Related posts about iphone