custom alert-wait_fences: failed to receive reply: 10004003
<p>i have created custom alertview while click on cancl button it is giving wait_fences: failed to receive reply: 10004003. i have implemented didDismissWithButtonIndex but again same message is coming. please give me solution.</p>

<p>here is my code
i am calling custom alert:-</p>

<pre><code>      customAlert = [[CustomAlert alloc]initWithTitle:@"Alert" message:@"Please select job family and job title" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
      [customAlert show];
      [customAlert release];
</code></pre>

<p>creating design:-</p>

<pre><code>- (void)drawRect:(CGRect)rect 
{

    CGContextRef context = UIGraphicsGetCurrentContext();

    CGRect activeBounds = self.bounds;
    CGFloat cornerRadius = 10.0f;   
    CGFloat inset = 6.5f;   
    CGFloat originX = activeBounds.origin.x + inset;
    CGFloat originY = activeBounds.origin.y + inset;
    CGFloat width = activeBounds.size.width - (inset*2.0f);
    CGFloat height = activeBounds.size.height - (inset*2.0f);

    CGRect bPathFrame = CGRectMake(originX, originY, width, height);
    CGPathRef path = [UIBezierPath bezierPathWithRoundedRect:bPathFrame cornerRadius:cornerRadius].CGPath;//Graphics path for shapes and line

    //background color
    CGContextAddPath(context, path);
    CGContextSetFillColorWithColor(context,[UIColor colorWithRed:0.941 green:0.973 blue:1 alpha:0.9].CGColor);

    CGContextDrawPath(context, kCGPathFill);

    //button design
    CGFloat buttonOffset = 92.5f; 
    CGContextSaveGState(context); 
    CGRect hatchFrame = CGRectMake(12.0f, buttonOffset-10, activeBounds.size.width-24, (activeBounds.size.height - buttonOffset+1.0f-9));

    CGPathRef path1= [UIBezierPath bezierPathWithRoundedRect:hatchFrame cornerRadius:3].CGPath;
    CGContextAddPath(context, path1);
    CGContextSetFillColorWithColor(context,[UIColor colorWithRed:0.957 green:0.643 blue:0.376 alpha:1].CGColor);
    CGContextDrawPath(context, kCGPathFill);
    CGContextSaveGState(context);


    //shadow
    CGContextAddPath(context, path);
    CGContextSetLineWidth(context, 3.0f);
    CGContextSetStrokeColorWithColor(context, [UIColor colorWithRed:210.0f/255.0f green:210.0f/255.0f blue:210.0f/255.0f alpha:1.0f].CGColor);
    CGContextSetShadowWithColor(context, CGSizeMake(0.0f, 0.0f), 6.0f, [UIColor colorWithRed:0.0f/255.0f green:0.0f/255.0f blue:0.0f/255.0f alpha:1.0f].CGColor);
    CGContextDrawPath(context, kCGPathStroke);

    //Border color
    CGContextAddPath(context, path);
    CGContextSetLineWidth(context, 3.0f);
    //  CGContextSetStrokeColorWithColor(context,[UIColor colorWithRed:0.957 green:0.643 blue:0.376 alpha:1].CGColor);
    CGContextSetStrokeColorWithColor(context,[UIColor colorWithRed:0.957 green:0.643 blue:0.376 alpha:1].CGColor);
    CGContextDrawPath(context, kCGPathStroke);
    CGContextRestoreGState(context);



}
</code></pre>
