PokerDownView.m 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // PokerDownView.m
  3. // GoldenFlowerDemo
  4. //
  5. // Created by GuoMs on 16/11/17.
  6. // Copyright © 2016年 zcd. All rights reserved.
  7. //
  8. #import "PokerDownView.h"
  9. #define kStrokeSize (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 2.0 : 1.0)
  10. @implementation PokerDownView
  11. - (void)awakeFromNib
  12. {
  13. [super awakeFromNib];
  14. CGFloat smallheight = kPokerH+7;
  15. self.plantImgHeight.constant = smallheight*103.0/143.0;
  16. self.plantImgWidth.constant = smallheight*103.0/143.0*152.0/129.0;
  17. self.betPersonLableHeight.constant = smallheight*40.0/143.0;
  18. self.lotPokerIMG.hidden = YES;
  19. self.betPersonLable.backgroundColor = [kBlackColor colorWithAlphaComponent:0.5];
  20. self.backgroundColor = [kBlackColor colorWithAlphaComponent:0.3];
  21. //self.betMultiple.textColor =[kBlackColor colorWithAlphaComponent:0.5];
  22. self.betMultiple.textColor = kWhiteColor;
  23. // self.layer.cornerRadius = 6.0;
  24. // self.layer.masksToBounds = YES;
  25. self.amountBetLable.strokeColor = [UIColor blackColor];
  26. self.amountBetLable.strokeSize = kStrokeSize;
  27. }
  28. #pragma mark -- 文字设置描边
  29. - (void)setText:(UILabel *)lable
  30. {
  31. NSMutableParagraphStyle *paragaph = [[NSMutableParagraphStyle alloc]init];
  32. paragaph.alignment = NSTextAlignmentCenter;
  33. NSDictionary *dict = @{NSFontAttributeName:[UIFont systemFontOfSize:24],NSParagraphStyleAttributeName:paragaph,NSForegroundColorAttributeName:[UIColor whiteColor],NSStrokeWidthAttributeName:@-3,NSStrokeColorAttributeName:[UIColor blackColor]};
  34. [lable.text drawInRect:lable.bounds withAttributes:dict];
  35. }
  36. @end