colinta / teacup

This project has been sunset in favor of MotionKit
github.com/motion-kit/motion-kit
Other
602 stars 85 forks source link

How to actually use 'path' when making a 'shadow' #130

Closed holgersindbaek closed 11 years ago

holgersindbaek commented 11 years ago

I've been wondering about how you actually go around doing this?

I'd like to do something like this:

style :splash_screen, left: 0, top: 0, width: "100%", height: "100%", shadow: { opacity: 0.05, radius: 7, offset: [7, 0], color: :black, path: UIBezierPath.bezierPathWithRect(self.view.bounds).CGPath }

But there is no such thing as 'self.view' inside my style file. So how do I get the bounds of the object I want to apply a shadow to, inside a style file?

colinta commented 11 years ago

Not possible, unfortunately. I see what you're going for, but I can't think of a suitable workaround here.

holgersindbaek commented 11 years ago

Ok… thanks for the clarification.