自定义alert-wait_fences:无法收到回复:10004003

时间:2013-01-08 06:28:29

标签: iphone

我创建了自定义alertview,同时点击了cancl按钮,它正在给出wait_fences:无法收到回复:10004003。我已经实现了didDismissWithButtonIndex,但同样的消息即将到来。请给我解决方案。

这是我的代码 我打电话给自定义提醒: -

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

创造设计: -

- (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);



}

0 个答案:

没有答案