Questions tagged [svgkit]

SVGKit is a Cocoa framework for rendering SVG files on iOS / OSX natively using CoreAnimation.

38 questions
0
votes
0 answers

How to parse Text element in SVG swift?

I am using PocketSVG, SwiftSVG and SVGKit libraries to parse SVG elements and convert into CALayer. But I don't know how to parse Text element and its attributes from SVG in swift. I want to get My Text string from below SVG text element. How can I…
Ali Akbar
  • 7
  • 5
0
votes
1 answer

Xcode 12 and SVG from a string/text

I'm trying to manipulate SVG using simple XML codes to add SVG into Xcode using the framework SVGKit. But I got a fatal error: Fatal error: Unexpectedly found nil while unwrapping an Optional value: file aiSoccer/DetailViewController.swift, line…
Uncoke
  • 1,832
  • 4
  • 26
  • 58
0
votes
1 answer

How to recognize touch inside SVG object in Swift?

I'm currently building an app where I need to recognize a touch point inside a SVG map. So I have a map with multiple rectangles and when the user touches one of these rectangles an action needs to be triggered. How can I solve this? One option…
RedX
  • 461
  • 1
  • 4
  • 14
0
votes
1 answer

Svg image is not properly showing using SVGKit

I have used SVGKit library to show svg images but the is some extra numbering in the images. Here is the actual image: But the image shown in the imageView looks like this: As you can see in second image the numbers are showing on top and bottom…
Zahid Shaikh
  • 37
  • 10
0
votes
1 answer

CAShapeLayer : Identify shape : Add CATextLayer in that shape

I have SVG file and i was able to access SVG's shapes using SVGKit. Now, I have CAShapeLayer which may contain circle, square or any closed shape. I want to add CATextLayer on CAShapeLayer in such way that text should not cross the defined…
user4003752
0
votes
0 answers

How to create a complex SVG layer fill animation based on CAShapeLayer

As you can understand from the title of this question I am trying to achieve fill animation of CALayer(CAShapeLayer) of SVG file. How complex should be animation you can see from the images I attached. I decided to start just with a circle and…
O.Daniel
  • 123
  • 12
0
votes
1 answer

App Crashing as *** Assertion failure in +[SVGKImage imageWithSource:]

I am working with SVGKit in swift Project. I properly imported SVGKit Framework and 3rd party resources folder into my project by following (https://github.com/SVGKit/SVGKit). I created a folder with sets of .svg images inside the project and i am…
user7413163
  • 205
  • 1
  • 4
  • 15
0
votes
1 answer

SVGKit: How do i render an SVG XML String that references a iOS device photo using SVGKit

So, my basic question is: Is there a way on iOS to use SVGKit to render SVG that contains references to local images? Gory Details My application needs to generate and render SVG (XML in an NSString). The XML will reference image URLs on the device…
Joe Oguri
  • 1
  • 2
0
votes
1 answer

I can't upload application in app store?

I have an issue when uploading an application to the App Store. When I upload the application it shows the error: I'm using SVGKit and it runs perfectly on my device.
Mehul Valand
  • 31
  • 1
  • 4
0
votes
1 answer

Z-level of grapchics within UIView

I'm working on a drawing app, where user should be able to both fill locked areas and simply draw lines on finger moves. Locked areas are provided as SVGs (paths), so I'm using SVGKit library to render them on the screen (as CAShapeLayers within a…
0
votes
1 answer

CGPathContainsPoint relative to absolute coordinates iOS

I'm using SVGKit to display different SVG content in my app. One of required features is to detect tap happened within an area inside svg path and fill it with some color. CGPathContainsPoint seems to be the proper solution here, but the problem is…
0
votes
1 answer

How to design custom collection view programatically?

In my project I want to design custom View Cell programatically with SVGKImageView & UILabel like this here square is an SVGKImageView & "Dadar" is an UILabel. But now I am getting output like this This is my code func…
Priyanka Kanse
  • 1,051
  • 1
  • 15
  • 27
0
votes
0 answers

How can I create an SVG file from the content of a UITextView in iOS (Objective-C)?

I'm aware of this SVGKit, but it seems that its primary use is for rendering existing SVG files. Is there a way I can use it or anything else to generate an SVG from a UITextView and/or programmatically create an SVG from scratch in Objective C?
0
votes
1 answer

Detecting touch on SVGKit's SVGKImageView subclass

I have started using this great SVGKit for iOS. I am using a subclass of SVGKImageView. Now before subclassing SVGKImageView i have been easily able to add a UITapGestureRecognizer to it. But my requirement made me to use subclasses as i have to…
Umair
  • 400
  • 5
  • 19
0
votes
3 answers

how to use SVGKImage change SVG fill color?

how to use SVGKImage change SVG fill color? SVGKImage *svgImage = [SVGKImage imageNamed:@"card.svg"]; svgImage.size = self.bounds.size; SVGKLayeredImageView *imageLayer = [[SVGKLayeredImageView alloc] initWithSVGKImage:svgImage]; SVGKLayer *layer =…
Silver
  • 3
  • 1
  • 3