• 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 good way to implement Safari-tab animation effect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A good way to implement Safari-tab animation effect?


  • Subject: Re: A good way to implement Safari-tab animation effect?
  • From: John Pannell <email@hidden>
  • Date: Mon, 1 May 2006 19:49:33 -0600

Hi Eric-

I have written a safari-style tab control that features just the animation you are talking about. I implemented wit with NSTimers and custom drawing, however, to keep 10.3 compatible. You can download full source at:

http://www.positivespinmedia.com/dev/PSMTabBarControl.html

If you just want to see a possible way that animation could be done, you could look over the hideTabBar:animate: method on the PSMTabBarControl class. Note that there is a lot of code in there to handle a variety of cases (tab bar at top/bottom of window, resize window or partner view in response to the size change of the tab bar, etc.)

There is also custom animation of drag/drop that looks nice, with full source.

HTH!

John

John Pannell
Positive Spin Media
http://www.positivespinmedia.com

On May 1, 2006, at 7:17 PM, Eric Lin wrote:

I'm referring to how when you open the first tab in Safari, the tab
bar seems to slide down from above.

I'm planning to implement the same effect as follows:

1. Create a tab view (complete with the tab bar and content view)
2. Make the tab view a subview of an NSView of the same size, and
intentionally position the tab view "too high" so the tab bar lies
outside of the top border of the parent NSView (effectively hidden
it).
3. Using NSWindow's setFrame:animation method and autoresizingMask to
slide the tab view down, gradually revealing the hidden tab.

My only concern is whether it's "bad style" (in terms of overhead) to
introduce the parent NSView for no purpose other than hiding the tab
view, assuming there may be lots of windows open in my application.

Thanks,
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40positivespinmedia.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >A good way to implement Safari-tab animation effect? (From: "Eric Lin" <email@hidden>)

  • Prev by Date: Re: Is there any overhead on hidden views?
  • Next by Date: Re: Is there any overhead on hidden views?
  • Previous by thread: A good way to implement Safari-tab animation effect?
  • Next by thread: Refactoring tools available for Cocoa / ObjC?
  • Index(es):
    • Date
    • Thread