Guest User

Untitled

a guest
Jan 26th, 2016
72
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (void)LoadBubbleTextView:(NSString*)Text Frame:(CGRect)Frame{
  2.    
  3.     self.TextViewH.frame = Frame;
  4.    
  5.     UIRectCorner rectCorner = UIRectCornerTopLeft | UIRectCornerBottomLeft | UIRectCornerTopRight;
  6.    
  7.     UIBezierPath *maskPath;
  8.     maskPath = [UIBezierPath bezierPathWithRoundedRect:Frame //cell.viewMessage.bounds
  9.                                      byRoundingCorners:rectCorner
  10.                                            cornerRadii:CGSizeMake(20.0, 20.0)];
  11.    
  12.     CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  13.     maskLayer.path = maskPath.CGPath;
  14.    
  15.     self.TextViewH.layer.masksToBounds = YES;
  16.     self.TextViewH.layer.mask = maskLayer;
  17.    
  18.     self.TextViewH.text = Text;
  19. }
RAW Paste Data