Necesita un consejo con UIBezierPath. Forma de triángulo como Vista de registro de Instagram
Estoy tratando de crear un camino bezier como el triángulo de instagram en la imagen a continuación, sin embargo, debo estar haciendo algo mal. ¡El camino de Bezier no se muestra!
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewDidLayoutSubviews{
[super viewDidLayoutSubviews];
[self drawTriangle];
}
- (IBAction)closeButton:(UIButton *)sender {
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)drawTriangle{
UIBezierPath* trianglePath = [UIBezierPath bezierPath];
[trianglePath moveToPoint:CGPointMake(self.signUpButton.center.x, self.signUpButton.frame.origin.y + 30)];
[trianglePath addLineToPoint:CGPointMake(self.signUpButton.center.x - 10, self.imageView.frame.size.height)];
[trianglePath addLineToPoint:CGPointMake(self.signUpButton.center.x + 10, self.imageView.frame.size.height)];
UIColor *fillColor = [UIColor whiteColor];
[fillColor setFill];
UIColor *strokeColor = [UIColor whiteColor];
[strokeColor setStroke];
[trianglePath fill];
[trianglePath stroke];
[trianglePath closePath];
}