Re: dumb question
Re: dumb question
- Subject: Re: dumb question
- From: WT <email@hidden>
- Date: Fri, 12 Jun 2009 14:58:59 +0200
I have the following in a project of mine, in a file Constants.h,
which I import as needed from other source files:
#define kAppFrame ([UIScreen mainScreen].applicationFrame)
#define kScreenWidth ([UIScreen
mainScreen].bounds.size.width)
#define kScreenHeight ([UIScreen
mainScreen].bounds.size.height)
#define kStatusBarHeight (kScreenHeight - kAppFrame.size.height)
So, in your case, why not something like the following?
#define kScreenBounds ([[UIScreen mainScreen] bounds])
On Jun 12, 2009, at 12:36 PM, Chunk 1978 wrote:
maybe this coffee hasn't kicked in yet and undoubtedly there is a
simple solution, but i'm trying unsuccessfully to refactor some code,
and i'd like to set the following as a static or define instead of
having it written several times in several methods
-=-=-=-
CGRect fullScreenRect = [[UIScreen mainScreen] bounds];
-=-=-=-
how can i do that?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden