drawrect Questions

1

Solved

I have a viewController which is obviously a subclass of UIViewController called MapViewController. In this viewController I use GPS to get the location of the user. I also have a view called Draw...
Jimjams asked 1/5, 2013 at 3:4

2

Solved

I am trying to capture image of my UIView but when I call this method - (UIImage *) imageWithView:(UIView *)view { UIGraphicsBeginImageContext(view.bounds.size); [view.layer renderInContext:UIG...
Machado asked 12/2, 2013 at 7:13

3

Solved

I am subclassing a UIView and overwrite the drawRect method. I'm noticing that the view's drawrect is only being called when the view first loads. After that it is never called again. How to I make...
Cabinet asked 26/3, 2010 at 19:32

1

Solved

The code below draws a perfect elliptical radial gradient, but does not fill in the corners of it's view. How do I get it to draw beyond the edge of the ellipse? The documented option is kCGGradien...
Kratz asked 5/1, 2013 at 8:17

1

Solved

I have a custom class which I derived from the UIView class. What I want to accomplish is just drawing vertical black lines with a predefined distance between. When I override the drawRect method a...
Mook asked 28/12, 2012 at 18:51

1

In my iPad app, I have a UITableView that alloc/inits a UIView subclass every time a new cell is selected. I've overridden drawRect: in this UIView to draw a radial gradient and it works fine, but ...
Carrol asked 10/7, 2012 at 20:15

1

Solved

I am trying to apply Autolayout constraints to a custom button which inherits from NSView. The button is rather complex and can be used as radio button for example. The user interface is composed i...
Anchoress asked 23/10, 2012 at 11:4

2

Solved

My application is able to do some simple figure's drawing (until I get a more stable code, I am sticking with only one figure) and it's also able to re-size them. The code I use to create a UIView ...
Rhiana asked 17/10, 2012 at 13:32

1

Solved

I'm creating a simple app where when the user presses a button, a series of lines will be drawn on the screen and the user will be able to see these lines drawn in real time (almost like an animati...
Thekla asked 9/10, 2012 at 20:41

1

Solved

I have a UIView with a custom shape drawn in drawRect:. The frame property is set to: {5.f, 6.f, 50.f, 50.f} Now, I render the view in an Image Context, but it is ignoring the frame property of ...
Outreach asked 6/9, 2012 at 6:15

3

I'm preparing my iPhone app to publish on iOS 5 GM and came across a bug with UIView. When I override the drawRect method on a subclass, the Simulator shows the desired result but when I try to tes...
Moonscape asked 8/10, 2011 at 20:34

2

Solved

Simply, I have 2 views in interface builder, one is set to the color 99,99,99 using the RGB sliders in interface builder. The other view is colored programmatically to achieve a certain shape. I...
Tormentil asked 28/5, 2012 at 4:20

2

Solved

I'm struggling with setNeedsDisplay. I thought it was supposed to trigger calls of drawRect: for the view for which it is called and the hierarchy below that if it's within the view's bounds, but I...
Beckner asked 14/7, 2012 at 1:41

2

How can i strore all pixel point in the CGContextAddArc To NSMutableArray.or CGContextRef to NSMutable Array static inline float radians(double degrees) { return degrees * PI / 180; } - (void)d...

7

Solved

So I've got a basic drawing app in the process that allows me to draw lines. I draw to an off screen bitmap then present the image in drawRect. It works but its way too slow, updating about half a ...
Grubby asked 29/6, 2012 at 12:5

2

Solved

iOS 5 changed the way the built-in Google Maps App draws routes: I would now like to replicate the design of the route overlay in my own app but I am currently only able to draw a plain blue lin...
Dight asked 30/12, 2011 at 0:49

1

Solved

Seem to be having a bit of an issue trying to draw my view into a context. My basic setup is, I have a view controller that owns a UIPageViewController in which I load controllers with views that ...
Dillingham asked 12/4, 2012 at 17:58

2

Solved

I have subclassed UIView and added a drawRect method to it. Then I define a view using this custom class and add subviews to it. The problem is that drawRect seem to draw stuff under the subviews...
Intramolecular asked 8/10, 2011 at 6:9

2

I'm using a custom UITableViewCell, into which I am placing a subclassed UIView (within contentView, natch). The UIView in question displays a directional arrow and two lines of supporting text. T...
Xylo asked 14/9, 2011 at 16:49

1

Solved

A part of my app is a statistics-function. I draw in a UIView a path and fill it with a color... now I want to make an animation that the path draws through the UIView from the left side to the rig...
Cannady asked 7/9, 2011 at 23:0

1

Solved

I have been doing some experimenting with iOS drawing. To do a practical exercise I wrote a BarChart component. The following is the class diagram (well, I wasnt allowed to upload images) so let me...
Sustentation asked 2/9, 2011 at 17:40

3

Solved

I have made a slick NSScroller subclass, but can't figure out how to make it overlay on top of the NSScrollView instead of pushing the documentView aside. Here you can see the background of a NS...
Polychasium asked 9/3, 2011 at 20:32

1

I have subclassed MKAnnotationView to create an annotation that basically draws a circle around a point on a map view through override of drawRect. The circle draws fine in the following situations...
Suzysuzzy asked 17/2, 2010 at 6:53

3

Solved

Here's a real mystery. Imagine you are doing the conventional process of drawing a complex image offscreen (CGLayer), and you are updating the image on to the screen intermittently as you draw. A...
Autotoxin asked 24/1, 2011 at 20:23

1

Solved

I'd like to add a drop shadow to text drawn using the iOS supplied NSString (UIStringDrawing) category method: - (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width withFont:(UIFont *)fon...
Member asked 8/12, 2010 at 14:10

© 2022 - 2024 — McMap. All rights reserved.