Questions tagged [uigraphicscontext]

The UIGraphicsContext is not a class as you might think, but a set of functions that allows access to functions of CGContext. UIGraphicsContext is often used to create images or PDFs from code.

The UIGraphicsContext is the programmatic interface to the graphics contexts.

Since iOS 10 and tvOS 10 UIGraphicsRenderer and its subclasses facilitates the creation of documents via UIGraphicsRendererContext, which are based on Objective-C / Swift classes. The creation process is quite similar to working with functions from UIGraphicsContext so that these functions become less and less important.

314 questions
0
votes
1 answer

How to create a custom object for handling emailing using UIMessage framework

I created a subclass of NSObject with the purpose of using instances of this class in other classes to execute the creation of a pdf file and then attaching and emailing that file. This should keep from having the heavy lifting of pdf creation and…
0
votes
1 answer

Stretch Image with multi region

I want to set a background image to uiview with multi region like picture below? How can i do that? (constant) <-----> +------------------+ ^ | | | | | (constant) | A | | B | | |-----+ - - +------| v |…
0
votes
0 answers

capture image from a view iOS

I am using the following code to capture the UIView as image -(void)startSnapSot { NSLog(@"TakeSnapShot"); UIImage* image = nil; // image = [self screenshot]; UIGraphicsBeginImageContext(overlayView.frame.size); …
0
votes
1 answer

iOS7 renderInContext does not capture png image with alpha

I'm working on the camera app that overlays images over the picture taken. It works perfectly on iOS5 and iOS6, but on iOS7, the images with alpha cannot be overlaid correctly. The overlaid images become completely…
mmrn
  • 249
  • 2
  • 8
  • 18
0
votes
0 answers

Method returning image visible on iPhone screen intermittently returns nil

It looks like I might've potentially found an answer to one of my earlier problems and would be happy to post the solution on SO though I first need to confirm it works properly. The problem is it seems to be - most of the time, though not always.…
JakeP
  • 1,736
  • 4
  • 23
  • 31
0
votes
1 answer

Make view behind present ViewController visible

I'd like to be able to dismiss my modals by sliding them down. To do, I'd like to be able to see the previous view controller behind the current one as I drag it down. To do so, I encapsulated my view in a scroll view and I tried to print an image…
Spearfisher
  • 8,445
  • 19
  • 70
  • 124
0
votes
1 answer

Detecting transperent pixel in the uiimageview in IOS

I want to detect the transparent part of the uiimageview. I am using this code to draw onto uiimageview. But i want to detect the transperent portion in uiimage and prevent filling the color into that portions. - (void)touchesMoved:(NSSet *)touches…
ios developer
  • 3,363
  • 3
  • 51
  • 111
0
votes
2 answers

Maintain image resolution in screen grab

In my app, the user is able to put stickers on top of a photo. When they go to save their creation, I do a screen grab and store it in a UIImage: UIGraphicsBeginImageContextWithOptions(self.mainView.bounds.size, NO, [UIScreen…
Ser Pounce
  • 14,196
  • 18
  • 84
  • 169
0
votes
0 answers

Multiple image merging causing memory leaks in iPad

I am recording voice with AVAudioRecorder in parallel, i am running NStimer in interval of 1 second with a function is merging multiple images to one and adding the same into NSmutablearray to use these images for video(MP4) in future. But after 10…
gaurav
  • 357
  • 1
  • 4
  • 13
0
votes
1 answer

How can I save and again load the images to and from iPad's Gallery

How can I save the images to iPad's Gallery, and again read them from there into my App. Is it possible to create a folder structure in iPad's gallery where I could store images generated through my app. Actually I am able to save the images to…
Prashant Nikam
  • 2,253
  • 4
  • 17
  • 29
0
votes
1 answer

Remove white background in UIImageView

I am using UIBezierPath to draw the lines in white background and black stroke using fingers and the touch end method I am cropping the image using CGGraphicsContext() and which is working fine. I would like to remove the white background and make…
0
votes
1 answer

Best pratice to draw clear image in UIScrollView

I have a UIscrollView I'm displaying an image in it in this way - (UIImage *)pageControlImageWithIndex:(NSInteger)index{ NSString *imagePath = [NSHomeDirectory() stringByAppendingFormat:@"/Documents/t%d.jpg",index]; NSFileHandle *fileHandle =…
OXXY
  • 1,047
  • 2
  • 18
  • 43
0
votes
3 answers

Draw line in Dynamically created UIView

I need to draw a shape/line in my dynamically created view. Here is the code I'm trying but it doesn't draw anything though the views are being added. //loc1 and loc2 are the touch locations on the view used to draw a rect UIView *vw = [[UIView…
SleepNot
  • 2,982
  • 10
  • 43
  • 72
0
votes
1 answer

Set visibility for items drawn on UIImage using UIGraphics

I have one UIImage *backgroundImage = [[UIImage alloc] initWithData:imgData]; I will draw an image on top of this image with: CGSize finalSize = [backgroundImage size]; UIImage *newImage; UIGraphicsBeginImageContext(finalSize); newImage =…
Sasa
  • 205
  • 1
  • 3
  • 16
0
votes
2 answers

UIWebview captures screenshot only for .doc files

Trying to create thumb pictures of documents that has been opened in my app with openurl. My app can open and save .doc .xls and .pdf file, but when I try to save the screenshot it can correctly save the .doc content, for pdf and xls it only saves a…
SpaceDust__
  • 4,844
  • 4
  • 43
  • 82
1 2 3
20
21