btn.clipsToBounds = YES; btn.layer.borderWidth =1; btn.layer.borderColor = [UIColor redColor].CGColor;