• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CGGetMidX error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGGetMidX error?


  • Subject: Re: CGGetMidX error?
  • From: Chunk 1978 <email@hidden>
  • Date: Wed, 10 Jun 2009 17:31:59 -0400

ahh... thanks :)

On Wed, Jun 10, 2009 at 5:25 PM, Greg Parker<email@hidden> wrote:
> On Jun 10, 2009, at 2:11 PM, Chunk 1978 wrote:
>>
>> i don't understand why i'm getting an error "invalid initializer" when
>> just declaring some variables in a method:
>>
>> -=-=-=-
>> CGRect fullScreenRect = [[UIScreen mainScreen] bounds];
>> CGPoint screenCenterPoint = (CGRectGetMidX(fullScreenRect),
>> CGRectGetMidY(fullScreenRect));
>> -=-=-=-
>
> Because your initializer for `screenCenterPoint` is invalid. Try spelling it
> like one of these:
>
>    CGPoint screenCenterPoint = CGPointMake(CGRectGetMidX(fullScreenRect),
> CGRectGetMidY(fullScreenRect));
>
>    CGPoint screenCenterPoint = { CGRectGetMidX(fullScreenRect),
> CGRectGetMidY(fullScreenRect) };
>
>
> --
> Greg Parker     email@hidden     Runtime Wrangler
>
>
>
_______________________________________________

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

References: 
 >CGGetMidX error? (From: Chunk 1978 <email@hidden>)
 >Re: CGGetMidX error? (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: CGGetMidX error?
  • Next by Date: App does not start on a different machine
  • Previous by thread: Re: CGGetMidX error?
  • Next by thread: App does not start on a different machine
  • Index(es):
    • Date
    • Thread