views:

281

answers:

1

Trying to draw a shadow using code from this question: http://stackoverflow.com/questions/805872/how-do-i-draw-a-shadow-under-a-uiview

I implement it in a UIView subclass as discussed, but when I try and use it using UIView *shadow = [[ShadowView alloc]initWithFrame:CGRectMake(100,100,100,100)]; I get only a black square, rather than something resembling shadow.

Am I missing something here?

A: 

Yup, you probably need to explicitly add an #import to the top of your class. I've had the same issue before and that fixed it. (Can't exactly explain why though)

Brad Smith
That can't be it. If I didn't have the import the compiler would throw an error at me. Regardless, I have #import "ShadowView.h" in my header.
dc