quartz-core

Adding quartzcore to Xcode 4 for iOS

霸气de小男生 提交于 2019-12-17 12:40:31
问题 I have troubles installing quartzcore on Xcode 4 regarding an iOS application. I just can't find the answer: how to do it? Because when I try to add Quartzcore to the targets of the project, it seems I can only add a Mac OS X framework. All you can do about an iOS framework is creating one. 回答1: In Xcode 4, in the left sidebar, select the project file at the top: 1) Make sure your target is selected in the main view, and you should see 5 tabs at the top, 2) Click the "Build Phases" tab, 3)

How to make a circular UIView

随声附和 提交于 2019-12-17 05:39:31
问题 I want to make a UIView or UIImageView that is a circle. Or a circle that i can change the size of using a slider, and the color of with a pickerview. 回答1: I can at least show you a shortcut for drawing circles of arbitrary size. No OpenGL, no Core Graphics drawing needed. Import the QuartzCore framework to get access to the .cornerRadius property of your UIView or UIImageView. #import <QuartzCore/QuartzCore.h> Also manually add it to your project's Frameworks folder. Add this method to your

Is there an alternative to CGPath which allows to compute points on a path for a given location?

时间秒杀一切 提交于 2019-12-13 12:09:22
问题 For an animation timing algorithm I need to supply a path as the curve. Probably a bezier curve with control points on both ends. The problem is that it seems not possible to calculate points on a CGPath because CGPathRef is opaque. Also Apple provides no mechanism to compute points on a path. Is there a library or utility class which can compute points on a bezier curve or path, for a given location like 0.5 for the middle along the path? Or let me rephrase it: If CGPath / CGPathRef makes

How can i make my CATextLayer object Scrollable like UITextView?

不羁岁月 提交于 2019-12-13 08:26:33
问题 I have used CATextLayer for Displaying bold and Normal text together.Now some time i am getting long text from the Web Service response so i am not able to display complete text.Can any one please help me what should be the way to make CATextLayer object Scrollable like textview.Please suggest me any solution regarding this.I have also take reference from Here but it's not working for me. I am using this code: /* Create the text layer on demand */ if (!_textLayer) { _textLayer = [[CATextLayer

Adding drop shadow to UITableView doesn't work properly

一笑奈何 提交于 2019-12-13 07:06:30
问题 I've created a sample app for adding drop shadow to a UITableView. When you click on the right navigation button a drop shadow is added to the table. The problem is that the shadow is added only to the part of the table visible in the screen. If I try to scroll up (and go off the table) or scroll down and see others cell the shadow is not visible. How can I set a shadow for the entire height of the table? If is possible I would have the shadow also if I scroll up and go off the table (for the

Circular CAGradientLayer Mask

不问归期 提交于 2019-12-13 02:38:17
问题 I have a UIView that programmatically draws a "sunburst" pattern using UIBezierPath . Now I would like to extend this by masking the edges with a gradient -- effectively making each "burst" fade from opaque to transparent. I'm think this could be done with a CAGradientLayer mask but I'm not sure how to make it circular. This is what I'm trying -- it masks the view but the gradient is linear: CAGradientLayer *l = [CAGradientLayer layer]; l.frame = CGRectMake(0.0f, 0.0f, rect.size.width, rect

CALayer mask property

▼魔方 西西 提交于 2019-12-12 17:30:04
问题 I found this line confusing? When configuring a mask, remember to set the size and position of the mask layer to ensure it is aligned properly with the layer it masks. What align means here? Does it means that you have to provide a mask that as a frame equal the bounds of the masked layer? Does it means that you can't be outside the visible part of the bounds of the masked layer? 来源: https://stackoverflow.com/questions/33278723/calayer-mask-property

append arrowhead to UIBezierPath

帅比萌擦擦* 提交于 2019-12-12 13:28:09
问题 I need your help: I am trying to create a graph using UIBezierPaths with variable widths and consisting of a bezier curve with two control points. Now I'd like to add arrow heads to the end (right hand side) of these paths. Is there a way to do this i.e. by appending a subpath with a smaller lineWidth which contains a triangle? here is a sample picture of some paths to which I'd like to add arrowheads: Thanks for your help! 回答1: Let's assume you drew one of arcs like so: UIBezierPath *path =

Core Animation Warning: “uncommitted CATransaction”

余生颓废 提交于 2019-12-12 01:34:23
问题 I am getting the following warning with Device only: CoreAnimation: warning, deleted thread with uncommitted CATransaction; created by: 0 QuartzCore 0x3763c65d <redacted> + 220 1 QuartzCore 0x3763c541 <redacted> + 224 2 QuartzCore 0x3763fe2f <redacted> + 30 3 QuartzCore 0x3763b9bf <redacted> + 318 4 QuartzCore 0x3763b87b <redacted> + 50 5 QuartzCore 0x3763b80b <redacted> + 538 6 MyApp 0x000df597 -[CommonClass orangeGradient:] + 382 7 MyApp 0x000f70e1 -[HomeViewController updateStatusBar] +

iOS: Layer shadow path is not correct

纵饮孤独 提交于 2019-12-11 13:54:57
问题 I have UIView in my design and I need to allow user to change the corner radius. I have designed the testier using @IBDesignable and @IBInspectable . I am getting the expected shape( cornerRadius curve) upto the 33% of cornerRadius e.g bounds.size.width = 100 , I am getting correct shadow shape if corner radius is upto 33. If cornerRadius is more than 33 then shadow shape becomes circle irrespective of original shape cornerRadius . Any suggestion? Please refer the code and design screenshot