• 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: How to control the window by cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to control the window by cocoa


  • Subject: Re: How to control the window by cocoa
  • From: Andrew Farmer <email@hidden>
  • Date: Wed, 15 Apr 2009 22:18:16 -0700

On 14 Apr 09, at 23:32, Joe Yi wrote:
hello everybody: These days I beginning to develop a application with
xcode.
the program confine the window,make it can‘t be resize.

You can do this from Interface Builder. Look in the properties for a window.


and limit the frame of the window .make it can't out of the area of the
screen. When the border of the window touch
the border of the screen. It'll come out a warning message box and stop it.

This sounds incredibly annoying. AppKit already prevents you from moving windows too far off the screen, so unless there's some specific reason you need this functionality, I'd advise against trying to implement it. (In particular, displaying an alert in response to an attempt to move the window off the edge of the screen is a really bad idea, as it may show up while the user still has the mouse button down.)


That all being said, NSWindow has a delegate method that'll help you here. Look through the documentation - it should be pretty obvious which one it is. Between that and NSScreen, you should be set._______________________________________________

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: 
 >How to control the window by cocoa (From: Joe Yi <email@hidden>)

  • Prev by Date: Re: -viewDidMoveToWindow without subclassing? NSViewController?
  • Next by Date: Re: How to test if object is KVO observer?
  • Previous by thread: Re: How to control the window by cocoa
  • Next by thread: Combing Bindings with Target-Action
  • Index(es):
    • Date
    • Thread