quartz-core

How to convert (.doc,.xls,.ppt) to pdf using objective c? [closed]

删除回忆录丶 提交于 2019-12-23 06:22:39
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I can able to implement the annotation on pdf file and export it. But in the case of doc,xls and ppt i couldn't able to apply the annotation using objective c ? So i had plan to convert the (.doc,.xls,.ppt) files to pdf format. Using UIKit or Quartz framework possible to implement ? 回答1: You can do it with

UIView animateWithDuration not animating in ios8

房东的猫 提交于 2019-12-23 01:16:23
问题 I have implemented a custom segue class for emulating the push transition without navigation bar. The trick is to take to snapshots, add them to the view, replace the viewController, move the snapshots, and finally remove them. This emules a horizontal movement of the viewController, but actually only two UIImagesView are moved. The following code implements this. self.destinationImageView.frame = offsetFrameD; self.sourceImageView.frame = offsetFrameS; //ViewController replacement [self

kCGTextStroke's Fill and Stroke aren't positioned correctly

被刻印的时光 ゝ 提交于 2019-12-22 11:37:34
问题 So I'm using the code below to apply a stroke (and fill) to text in a UILabel , and it's coming out like the image below. The stroke is heavier on one side than the other (look at the top of the letters compared to the bottom, and the right compared to the left. The period at the end makes it very noticeable, too, looks like a googly eye). I've not got any shadowing turned on at all, so I don't think it's the shadow interfering with the stroke. What could be causing this? - (void)

UIBezierPath point at fraction of path

我们两清 提交于 2019-12-22 10:49:35
问题 Given an arbitrary UIBezierPath , I'm looking for a way to get a point at a fraction of the length of that path. Example: UIBezierPath *path = [UIBezierPath bezierPath]; [path moveToPoint:CGPointMake(200.0, 200.0)]; [path addLineToPoint:CGPointMake(200.0, 400.0)]; CGPoint p = [path pointAtFraction:0.5]; p should be {x: 200.0, y: 300.0} in this case. I'm aware that this simple example could be calculated, but I'm looking for a solution that fits ANY UIBezierPath (arcs, rounded rects, etc.)

How to draw Arc with curved edge in iOS?

冷暖自知 提交于 2019-12-21 19:57:29
问题 In one of my application, I am trying to draw a gradient arc with rounded edges. Like the following image. This is what I have done so far using the following code. -(void)startArc { UIBezierPath *roundedArc = [self arcWithRoundedCornerAt:centerPoint startAngle:DEGREES_TO_RADIANS(-90) endAngle:DEGREES_TO_RADIANS(90) innerRadius:width-20 outerRadius:width cornerRadius:0]; CAShapeLayer *mask = [CAShapeLayer new]; [mask setPath:roundedArc.CGPath]; [mask setFrame:_outerView.bounds]; [mask

Not able to include undo/redo with smooth free hand drawing

若如初见. 提交于 2019-12-21 18:49:31
问题 Struggling with issue since many days. Hope i can get an answer here. i have used this link to smoothen my free hand drawing. In this code i was able to set line width and color but i am finding it much difficult when i try to include undo/redo feauture in it using this link which is working fine on undo redo but its free hand dreawing is not smooth. After some research and coding i am to know that its the cathing of drawing which is i think preventing the undo/redo. In the first link there

Custom CALayer - invalid context 0x0

余生颓废 提交于 2019-12-21 05:38:11
问题 I'm trying to build an app that use layers, my app structure is UIView --> UIScrollView --> UIView --> LayersView (Custom UIView) --> UIImageView I want to add multiple layers to the LayersView, so I've build a custom CALayer that use UIBezierPath to draw a set of points. CALayerBezierPath.h #import <QuartzCore/QuartzCore.h> @interface CALayerBezierPath : CALayer { NSMutableArray *pointsArray; } @property (nonatomic, retain) NSMutableArray *pointsArray; - (void) initVariables; - (void)

Fading out any content which approaches edges of UIScollView

旧城冷巷雨未停 提交于 2019-12-20 12:35:52
问题 As the title says, I am trying to give to some UIImageViews a fading out effect as they get closer and closer to any of the four edges of my UIScrollView. Since the user can drag the UIImages, if he drags them towards the edges, they start fading out, instead of giving that cut out effect as if there were borders to the UIScrollView. I tried this tutorial: http://www.cocoanetics.com/2011/08/adding-fading-gradients-to-uitableview/ suggested in another stack overflow question, but it can only

Customize UITextfield of the UISearchbar - iOS

冷暖自知 提交于 2019-12-18 11:11:12
问题 I'm trying to customize the textfield for the UISearchbar. The picture below shows my half done work. I have subclasses the UISearchbar and called it from my view controller. I'm trying to remove those dark gray lines from the textfield. Below is the implementation of the UISearchbar adding to subview of the viewcontroller. searchbar = [[SearchBar alloc] initWithFrame:CGRectMake(35,78, 250, 17)]; searchbar.backgroundColor = [UIColor clearColor]; searchbar.layer.borderColor = [[UIColor

Bordered UITextView

人走茶凉 提交于 2019-12-17 15:27:05
问题 I want to have a thin gray border around a UITextView . I have gone through the Apple documentation but couldn't find any property there. Please help. 回答1: #import <QuartzCore/QuartzCore.h> .... // typically inside of the -(void) viewDidLoad method self.yourUITextView.layer.borderWidth = 5.0f; self.yourUITextView.layer.borderColor = [[UIColor grayColor] CGColor]; 回答2: Add the following for rounded corners: self.yourUITextview.layer.cornerRadius = 8; 回答3: Here's the code I used, to add a