Advertisement
Guest User

Untitled

a guest
Feb 26th, 2013
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     UIBezierPath *path = [[UIBezierPath alloc] init];
  2.    
  3.     CGFloat indicatorWidth        = 30.0;
  4.     CGFloat indicatorHeight       = 20.0;
  5.     CGFloat indicatorPosition     = 30.0;
  6.    
  7.     CGFloat x = rect.origin.x, y = rect.origin.y, width = rect.size.width, height = rect.size.height - indicatorHeight;
  8.    
  9.     [path moveToPoint:CGPointMake(0.0, 0.0)];
  10.     [path addLineToPoint:CGPointMake(x, height)];
  11.     [path addLineToPoint:CGPointMake(indicatorPosition, height)];
  12.     [path addLineToPoint:CGPointMake(indicatorPosition + (indicatorWidth / 2), height + indicatorHeight)];
  13.  
  14.     [path addLineToPoint:CGPointMake(indicatorPosition + indicatorWidth, height)];
  15.  
  16.     [path addLineToPoint:CGPointMake(width, height)];
  17.     [path addLineToPoint:CGPointMake(width, -height)];
  18.  
  19.    
  20.     [[UIColor redColor] setStroke];
  21.    
  22.    
  23.     [path setLineWidth:2.0];
  24.     [path stroke];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement