Core Graphics, meet Core Image


Following on from the Core Graphics tutorial, this download-able demo app presents an easy way to look at the various effects available both through documented and undocumented code.

Transitions Demonstration

Demonstration of the various effects available using Core Graphics and Core Image.

Usage

As easy as

  1. Download the package.
  2. In Xcode, open AnimatingTabsDemo.xcodeproj, then click build and run, or press Command + R. The Application will build, and the demo will run!
  3. Run through the demo and play around with all the different transitions you can use!

After you’ve built it once, you can simply run the “Transitions Demo.app” package that is created in the “build” folder by double-clicking it without going through the prior steps again.

Real World Usage

When using the NSTabView subclass, you can change the default transition by setting transitionsStyle to one of the following. (Hover your mouse over for a description)

  • CGNone
  • CGFade
  • CGZoom
  • CGReveal
  • CGSlide
  • CGWarpFade
  • CGSwap
  • CGCube
  • CGWarpSwitch
  • CICopyMachine
  • CIDisintegrate
  • CIDissolve
  • CIFlash
  • CIMod
  • CIPageCurl
  • CIRipple
  • CISwipe

For example, in the AnimatingTabView’s awakeFromNib: method, the following code sets the transition style to a cube effect:

transitionStyle = CGCube;

If you’re not in the AnimatingTabView’s implementation, you can use the - setTransitionStyle method. The following code sets the transition style to a ripple effect:

[AnimTabView setTransitionStyle:CIRipple];

where AnimTabView is the outlet to the AnimatingTabView

You can also get the current transition style by using the `-transitionStyle` method on the AnimatingTabView.

Transitions starting with “CG” are Core Graphics transitions and the result in the whole window being animated, while those starting with “CI” are Core Image transitions and only animate the tab view rather than the whole window.


Version History

Version 0.1

  • Initial pre-release demonstration

Version 0.1.1

  • Fixed bug with linking QuartzCore framework. (Thanks Jason Harris)

Core Transitions Demo

All contents copyright 2006-07 Ankur Kothari


Back to Top ↑

23 Comments so far

Leave a comment
  1. 1

    When I try to compile that project, I get several errors:
    /usr/bin/ld: Undefined symbols:
    .objc_class_name_CIFilter
    .objc_class_name_CIImage
    .objc_class_name_CIVector
    /Users/loganwilliams/Desktop/Core Transitions/build/AnimatingTabsDemo.build/Development/Transitions.build/Objects-normal/ppc/AnimatingTabView.o reference to undefined .objc_class_name_CIFilter
    /Users/loganwilliams/Desktop/Core Transitions/build/AnimatingTabsDemo.build/Development/Transitions.build/Objects-normal/ppc/AnimatingTabView.o reference to undefined .objc_class_name_CIImage
    /Users/loganwilliams/Desktop/Core Transitions/build/AnimatingTabsDemo.build/Development/Transitions.build/Objects-normal/ppc/AnimatingTabView.o reference to undefined .objc_class_name_CIVector
    collect2: ld returned 1 exit status

    Any reason why?

  2. 2

    Let me guess, you’re using an Intel computer?

    Try going to Project->Edit Project Settings. Under the build tab, double-click Architectures and uncheck PowerPC. Then go to Project->Edit Active Target ‘Transitions’ and do the same thing.

    Let me know if it works.

  3. 3

    Nope, PowerBook G4 here. Tried unchecking Intel on both of those, but it did not resolve the situation.

  4. 4

    If you’re running Tiger, it should run… Try the compiled universal binary and see if that works for you.

    Nice site by the way.

  5. 5

    The compiled binary did not run. Here is the crash log, if that helps. The original tutorial ran, and I have had no problem compiling applications in Xcode for ppc only in the past. What about a compiled PPC only binary?

    Thanks.

  6. 6

    Oops, typo. Real crash log is here.

  7. 7

    PPC Only app is here.

    It should theoretically work since all the code in it is documented at http://developer.apple.com/documentation/GraphicsImaging/Conceptual/CoreImaging/index.html and Apple provide examples for half this stuff anyway. I’ll dig up a little more and see what I can find.

  8. 8

    Ok, a Core Image example project is available from the Apple website here. If that doesn’t work, then we it’s not this specific project that’s failing. It could be because of the G4 processor / something to do with the graphics card not supporting it.

  9. 9

    Hey, but that’s awesome, too!

  10. 10

    Glad you like it ;)

  11. 11

    Ankur, you’re seeing the compilation problem because the app isn’t linking with QuartzCore. Project -> Add to Project. Choose /System/Library/Frameworks/QuartzCore.framework.

  12. 12

    Thanks for that Jason.

    Core Image has always worked for me without linking to Quartz Core, so I always leave it out, but it seems this doesn’t work on other computers. I guess that’s bad coding practice on my part. Thank you for picking that up, I’ve updated the source (and compiled files) and have now re-uploaded them.

  13. 13

    I was so impressed with the slickness of the demo that I actually chuckled out loud. Fantastic work.

  14. 14

    Thanks Scott. Glad you liked it. Feel free to use the code if need be.

  15. 15

    Wow, this is fantastic. I’m really looking forward to finding out more about Core Image.

  16. 16

    Hi Ankur…man this is awesome…I am learning Core Image and core Graphics and was looking for some code to get started up. Your app seems like the perfect one.Thanks man…and god bless

  17. 17

    Thanks Adam and Mithun. Hope it comes in handy.

  18. 18

    is there anyway that when people give downloads they could automatically just say what the minimum system requirements are?

  19. 19

    Sorry Ben. I’ll try to keep that in mind.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Comments may be edited for formatting.