• 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: A couple questions relevant to games
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple questions relevant to games


  • Subject: Re: A couple questions relevant to games
  • From: j o a r <email@hidden>
  • Date: Sun, 17 Feb 2008 19:36:15 -0800


On Feb 17, 2008, at 7:20 PM, Aaron MacDonald wrote:

With regards to your concerns about keeping square proportions, take a look at "-[NSWindow setResizeIncrements:]", or alternatively "-[NSWindow(Delegate) windowWillResize:toSize:]".

Are you sure? I only want to control the resizing of the tile view (that's what I'll call it) itself.


Most of the time, changes to the width/height ratio of the view would correspond directly with changes to the width/height ratio of the window. Are you sure that's not the case in your app? That said, if this option doesn't work out for you, you can always just programmatically keep the view at the right size in response to whatever other event that suits you.


This works when the window is first shown, but it doesn't handle resizing well. When I have it set to not expand and I shrink the window to smaller than the tile view's initial size, its tiles get squished out of proportion (so far I'm trying to get square tiles).


It sounds like you have some sort of bug in your resizing code. Add logging statements to see how the size of your view correlates to the size of your window as it is resized.


There's also the issue of the grid dimensions been magic numbers. I want an initialization method where I provide the grid width, grid height, and tile size. It's just that I can't see where I'd be able to call that since it appears I can only access my tile view through Interface Builder. This is especially troublesome if I want to have more than one tile view, such where I have a main view screen and a mini-map.


Make sure that the view is assigned to an "outlet" (instance variable) of your window controller. This will give you a reference to the view to be used at runtime.

j o a r


_______________________________________________

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: 
 >A couple questions relevant to games (From: Aaron MacDonald <email@hidden>)
 >Re: A couple questions relevant to games (From: j o a r <email@hidden>)
 >Re: A couple questions relevant to games (From: Aaron MacDonald <email@hidden>)

  • Prev by Date: Re: A couple questions relevant to games
  • Next by Date: Re: Enabled Binding bound to NSArrayController won't disable view.
  • Previous by thread: Re: A couple questions relevant to games
  • Next by thread: Re: A couple questions relevant to games
  • Index(es):
    • Date
    • Thread