2017-01-28 6 views

答えて

0
UIBezierPath *aPath = [UIBezierPath bezierPath]; 
    // Set the starting point of the shape. 
    if (Flag==0) { 
//First rectangle 

     [aPath moveToPoint:CGPointMake(0.0, 0.0)]; 
     // Draw the lines. 

     [aPath addLineToPoint:CGPointMake(375.0, 0.0)]; 

     [aPath addLineToPoint:CGPointMake(367.5, 32.8)]; 

     [aPath addLineToPoint:CGPointMake(7.5, 32.8)]; 

      } else { 
//Second Rectangle 

     [aPath moveToPoint:CGPointMake(7.5, 0.0)]; 

     [aPath addLineToPoint:CGPointMake(367.5, 0.0)]; 

     [aPath addLineToPoint:CGPointMake(375, 32.8)]; 

     [aPath addLineToPoint:CGPointMake(0, 32.8)]; 

    } 

    [aPath closePath]; 

    return aPath; 
関連する問題