Anti-Aliasing of UIBezierpath with RoundedRect
===

I created a rounded rect with UIBezierpath which works very good for me. There is only one problem the rounded edges of the rect have a kind of aliasing effect.
Here is a picture ![Aliasing on corners][1]


  [1]: http://i.stack.imgur.com/HlP8z.png

I create the rounded rect like this:


    CGFloat radius = 12;
    CGRect frame1 = CGRectMake(self.bounds.origin.x, self.bounds.origin.y+(self.bounds.size.height/heightFactor), self.bounds.size.width-shadowConst, self.bounds.size.height-(self.bounds.size.height/heightFactor)-shadowConst);

    CGRect frame2 = CGRectMake(self.bounds.size.width-(self.bounds.size.width/widthFactor), self.bounds.origin.y+(self.bounds.size.height/(heightFactor*2)), (self.bounds.size.width/widthFactor)-shadowConst, (self.bounds.size.height/heightFactor));

    UIBezierPath *result =
    [UIBezierPath bezierPathWithRoundedRect: frame1 cornerRadius:radius];
    [result appendPath:
     [UIBezierPath bezierPathWithRoundedRect: frame2 cornerRadius:radius]];
    [result fill];
    [result addClip];
    CGContextDrawLinearGradient(context, gradient2, CGPointMake(0, 0), CGPointMake(0, self.bounds.size.height), 0);