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
0 answers

Redraw saved in array UIBezierPaths on UIVew

I'm using subclass of UIView, in order to draw shapes with UIBezierPath and touchEvents. I'm making an app (like paint), in which I have two modes of drawing (change stroke color and width in drawRect) and when I switch between them, the already…
P.Todorov
  • 43
  • 10
0
votes
1 answer

Can a UIBezierPath Rect maintain it's position for all orientations?

Is it possible to reset the element to the same % position (distance from x = 0 axis) for both landscape and portrait mode? If yes could you show me how? Also since i am a newbie to Swift if you notice any bad code mistake please DO notify me in…
Korpel
  • 2,432
  • 20
  • 30
0
votes
1 answer

Trying to create a wheel of fortune, difficulties creating wheel sections

I'm new to swift and to development at all. I'm trying to create a wheel fortune for my app but I'm having some difficulties. I need to be able to set the number of sections of the wheel each time differently. Any help how to do it? I tried to…
Peter
  • 45
  • 2
  • 10
0
votes
1 answer

Different results of adding UIBezierPath in UIKit and SpriteKit

I'm trying to add an arc to my SpriteKit scene with SKShapeNode. If I draw an arc with UIView like: - (void)drawRect:(CGRect)rect { UIBezierPath *path = [UIBezierPath…
El Tomato
  • 6,479
  • 6
  • 46
  • 75
0
votes
0 answers

How to do a hit test on line segments drawing using UIBezierPath

Just wondering if there is any way of doing hit test on open ended shapes like line segments drawn using UIBezierPath.
Magesh
  • 277
  • 1
  • 4
  • 13
0
votes
0 answers

CAShapeLayer Multiple Drawing At Once Swift 2.0

I want to create a visual representation of 3 different numbers that relate to how much of something a user has. I know it's probably best to use CAShapeLayer. So I need to draw one circle radius at 40%, another(different color) at 65%, and…
justColbs
  • 1,504
  • 2
  • 18
  • 28
0
votes
2 answers

UIBezierPath fill with an offset in a custom UIView in a UITableViewCell

I have a custom UIView that draws a filled rounded rect in the view. The issue is when I place the view in my UITableViewCell and place constraints, when ran, it doesn't draw the rounded rect in the spot I placed it. Here are the images for…
jacks205
  • 545
  • 8
  • 19
0
votes
1 answer

How to have true rounded corners on a UITableView?

I say true because while one can do tableView.layer.cornerRadius = 5.0, that method isn't 100%. It works great when you have enough cells to fill the entire frame of the UITableView, but... if you don't have enough cells to fill it entirely, then…
David
  • 7,028
  • 10
  • 48
  • 95
0
votes
1 answer

CGMutablePath always starts at 0,0

Learning to use a UIBezierPath path. I can draw a simple line within my UIView but the origin is always 0,0. What am I missing? Simple Code: CGMutablePathRef cgPath = CGPathCreateMutable(); UIBezierPath *aPath = [UIBezierPath…
0
votes
1 answer

CGRectContainsPoint using shape opposed to frame

So we have our detection here -(void)checkInFOVWithPlayer:(Player *)player andEnemy:(Player *)enemy { SKNode *fovNode = [player childNodeWithName:player.playersFOVName]; SKNode *node = [self childNodeWithName:@"enemy"]; CGPoint…
Daniel
  • 285
  • 3
  • 12
0
votes
0 answers

UIview size greate than 5462 not drawing any graphics

I am drawing line in my projects using UibezierPath, i am calculating and drawing line according to current width and another params. But, i have noticed that if view (in which i am drawing lines )'s width exceed 5462, it doesn't show up. Is there…
Milan
  • 11
  • 5
0
votes
1 answer

UIButton topLeft & bottomLeft radius not showing properly

To generate rounded button with top-left & bottom left radius I use the following code: var maskPath = UIBezierPath(roundedRect: button.bounds, byRoundingCorners: .BottomLeft | .TopLeft, cornerRadii: CGSizeMake(15.0, 15.0)) …
Linkon Sid
  • 521
  • 1
  • 5
  • 16
0
votes
1 answer

Draw UIBezierPath on UIImageView for image crop

I am working on a photo editing application and need the user to be able to draw a path to crop out the photo. I have a class that works with a UIView for drawing smooth UIBezierPath lines. However I really need to apply this to a UIImageView so…
Tanner Ewing
  • 337
  • 4
  • 18
0
votes
1 answer

How to implement animation like UBER app text while launching

Hey help me to achieve UBER app like animation while we launch the app. The animation is done when the app launches and UBER is written in an animated way. I tried by using UIBezier Path... But didn't achieved the desired effect. The sample code is …
User1075
  • 819
  • 15
  • 36
0
votes
0 answers

How can I detect if what the user draw it is a circle a square or a letter like "Z"?

I am trying to draw a figure without releasing finger and when I release finger I want to compare that shape to see if it's a line, a circle, a square or let's say a "Z". I am kinda new to drawing and stuff like that so I have no idea how to make…
Silviu St
  • 1,810
  • 3
  • 33
  • 42
1 2 3
99
100