Questions tagged [uibezierpath]

The UIBezierPath class lets you define a path consisting of straight and curved line segments and render that path in your custom views.

The UIBezierPath class lets you define a path consisting of straight and curved line segments and render that path in your custom views. You use this class initially to specify just the geometry for your path. Paths can define simple shapes such as rectangles, ovals, and arcs or they can define complex polygons that incorporate a mixture of straight and curved line segments. After defining the shape, you can use additional methods of this class to render the path in the current drawing context.

Its counterpart in OS X is .

Resources:

1777 questions
0
votes
1 answer

How To Draw Smooth Line Chart With SVG?

I'm working on a data visualization project that I need to show some info on a line chart. So I've used SVG to draw the lines but I need to use curves and make a smooth chart. How can I achieve this in SVG. This is what I've done so far: Current…
0
votes
2 answers

Animate UIView along BezierPath with delay

I want to animate a UIView in a figure 8 motion. I am doing this in Swift using BezierPath but I want to add a delay to the animation. let center: CGPoint = CGPoint(x: 60, y: 45) let cent: CGPoint = CGPoint(x: 90, y: 45) let radius: CGFloat =…
Cody Weaver
  • 4,756
  • 11
  • 33
  • 51
0
votes
0 answers

Change the color of text of custom InfoWindow when tapped

I am returning a custom view as a MarkerInfoWindow.In this view I have added a button to show text and add a view called triangle view which creates triangular shape below a rectangular Uivew which I am returning as InfoWindow.Everthing is fine and…
Nikhil
  • 379
  • 1
  • 3
  • 14
0
votes
0 answers

Setting UIBezierPath mask changes UIView's width

I have a vertical UIStackView with multiple UIButtons stacked one on top of each other. I want the bottom of the view to have rounded corners. So, I have this: Where each colored bar is a UIButton, and I want the bottom section (the green button)…
acib708
  • 1,573
  • 1
  • 13
  • 24
0
votes
1 answer

UIBezierPath set context

I'm trying to draw some lines using UIBezierPath in an overlay renderer. I get error CGContextSetStrokeColorWithColor: invalid context 0x0 which I suspect is due to the UIBezierPath not knowing the context. How do I set the UIBezierPath's…
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
0
votes
1 answer

[iOS Objective C]Drag Bezier curve from a point on closed bezier curve path

Sample image for the requirementI have drawn a closed path bezier curve using the UIBezier path code.Im able to find if touched point on screen is on the closed bezier path boundary or outside it. Requirement:- I need to drag the point where user…
0
votes
2 answers

showing shdow to uibiezierpath

I use the following code to draw a triangle shape,I want to apply shadow for this shape i have drawn using bezierpath. CGContextRef context = UIGraphicsGetCurrentContext(); //creating a new nsshadow NSShadow* shadow = [[NSShadow alloc]…
Nikhil
  • 379
  • 1
  • 3
  • 14
0
votes
1 answer

Bezierpath with rounded corners

I am using the following code to show the pointer like triangle view as shown in image below. UIView *triangleView = [[UIView alloc] initWithFrame:CGRectMake(70.0f,58.0f, self->_createAccountView.frame.size.width ,20.0f)]; UIBezierPath*…
Nikhil
  • 379
  • 1
  • 3
  • 14
0
votes
1 answer

UIBezierPath Draw On Top of Previous Path?

I am trying to customize EChart, a library for bar graphs on Github for my own purposes. In this file: https://github.com/zhuhuihuihui/EChart/blob/master/EChart/EColumn.m I am attempting to modify the setGrade: method so that instead of redrawing…
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191
0
votes
2 answers

Applying shadow on uibutton Makes the button text blury

Here is my code to add a shadow on my uibutton which is created using a .XIB file UIBezierPath *shadowPathEndbtn = [UIBezierPath bezierPathWithRect:CGRectMake(0, self->_navigationView.frame.size.height - 70,[UIScreen mainScreen].bounds.size.width ,…
Nikhil
  • 379
  • 1
  • 3
  • 14
0
votes
1 answer

Calculate how much laps the user did in a Circle Path

I have made a blue ball that can be dragged by the user only on a red circled path: I want to check how many times the user make a forward or backward lap (the start & end is at the top of the circle path), for example - If he drag the ball in a…
Eliko
  • 1,137
  • 4
  • 16
  • 26
0
votes
0 answers

Move Object Around a Circle

I have created a circle and would like to role another object around this circle. They are both with a UIView.Like a compass point rotating around. I think I understand the process but it doesn't work. @IBOutlet weak var compassArea: UIView! var…
duck1970
  • 127
  • 10
0
votes
0 answers

SpriteKit - SKAction.followPath

i've created an UIBezierPath called curve with following function: func CreatePath(){ let startpoint = CGPoint(x: self.frame.size.width / 6.8966, y: self.frame.size.height*0.5) let endpoint = CGPoint(x: self.frame.size.width - startpoint.x,…
aignetti
  • 481
  • 1
  • 3
  • 14
0
votes
1 answer

How do I get a multi colored border?

I have a circle that is filled based on percentage, but I need it to have a multi color border, i.e. 0-.10 is orange, .10-.50 is blue, .50-.70 is purple, and .70-1 is black. let circlePath = UIBezierPath(arcCenter:…
johnson
  • 157
  • 2
  • 11
0
votes
1 answer

SKAction follow UIBezierPath function not working SpriteKit - Swift

In my app I have a Sprite circling around another sprite. I want this sprite to speed up when the screen is held down. I have achieved the speed up function, but I cannot seem to figure out why the sprite resets back to a certain position when the…