I took the code from above and modified it to do what you are looking for. I have essentially the same need for my application.
You can find the code on my blog at
The Software Maven: Rounding Corners on a UIView - Travis Jensen's Software Blog.
Enjoy and thanks for the starting point on the drawing code!
tj