cgaffinetransform

iPhone - Apply landscape transform to UIViewAnimationTransition

Hi I apply the following transform to my view to display it in landscape mode. CGAffineTransform transform = CGAffineTransformMakeRotation((90.0 * M_PI) / 180); transform = CGAffineTransformTranslate(transform, +80, +80); Which works fine, now I have two or three other views I want to display in landscape. I would like to animate bet...

iPhone Curl Left and Curl Right transitions

I am looking for a way to do a UIViewAnimationTransitionCurlUp or UIViewAnimationTransitionCurlDown transition on the iPhone but instead of top to bottom, do it from the left to right (or top/bottom in landscape mode). I've seen this asked aroud the internet a few times but none sems to get an answer. However I feel this is doable. I ha...

CGAffineTransformMake - how to save the state of UIimageview to futher process it

I am using CGAffineTransformMake to flip an UIImageView vertically. It works fine but it does not seem to save the new flipped position of UIImageview, because when I try to flip it 2nd time (execute the line code below) it just does not work. shape.transform = CGAffineTransformMake(1, 0, 0, 1, 0, 0); help please. Thanks in advance. ...

Preserve line width while scaling all points in the context with CGAffineTransform

Hi there, I have a CGPath in some coordinate system that I'd like to draw. Doing so involves scaling the old coordinate system onto the Context's one. For that purpose, I use CGContextConcatCTM() which does transform all the points as it should. But, as it is a scaling operation, the horizontal/vertical line widths get changed to. E.g. ...

How do I use CGAffineTransformMakeScale and Rotation at once?

((UIImageView*)[dsry objectAtIndex:0]).transform = CGAffineTransformMakeRotation(1.57*2); ((UIImageView*)[dsry objectAtIndex:0]).transform = CGAffineTransformMakeScale(.5,.5); Just one of these works at a time. How can I save a transformation and then apply another? Cheers ...

UIView animation

I set up a small view, placed three concentric circles in it, and then applied the CGAffineTransformMakeScale function to it. This was meant to achieve the effect of expanding ripples, but unfortunately, the circles become very pixelated as they expand. I would have thought that these transforms take advantage of the fact that Coregra...

Convert coordinates between parent/child UIView after CGAffineTransform

Hi Before I go into doing everything by hand I would like to ask if there is some help to get from the framework. I have a UIView that holds another UIView with a map. The parent UIView holds some legends for the map. Initially I define some coordinates in the map view. e.g. (100, 40), and place a piece of graphics there in the parent ...

How to fix an imageView to another and move both together?

Hi, all! I'm developing a game in which I have a bow and arrow. I have to move both bow and arrow imageViews on touch through different angles for which I'm applying CGAffineTransform. The problem is this that after rotation, bow and arrow change their positions, so the arrow does not stay at the center of the bow. I want to fi...

CGAffineTransform does not rotate subview - MKAnnotationView, CGAffineTransformMakeRotation

I have a view that does 1 simple thing: draws an image. I can rotate the image like this: CGAffineTransform transform = CGAffineTransformMakeRotation((CGFloat)radians); self.transform = transform; // WORKS: DRAWS, ROTATES But if I delegate the image-drawing function to a subview, and apply the rotation transform to the subview: C...

Get just the scaling transformation out of CGAffineTransform

I found a similar question about getting just the rotation, but as I understand scaling and rotating work different in the transform matrix. Matrixes are not my strength, so if anybody would hint me how to get only the scaling out of a CGAffineTransform I'd greatly appreciate. btw. I tried applying the CGAffineTransform on a CGSize and...

Get size of UIView after applying CGAffineTransform

I was surprised not to find an answer to this question, maybe is something very simple I somehow overlook : How to get the real size of an UIView after I apply a CGAffineTransform to it? eg. my UIView has size 300 x 200, I apply a scaling transform let's say factor 2 both horizontal and vertical, so the UIView now takes 600 x 400 on...

iPhone/iPad Pan, Pinch and Rotate a view simultaneously

I'm trying to recreate the behaviour of the photos app, where you can pan, pinch and rotate simultaneously. I have the basics working, but I'm stuck on something. For the pan, I offset the centrepoint of the view by the translation amount. This is working well. For the pinch and rotate I'm applying an affine transform to the view. This...

iPhone: scale UIView about a specific point

I want to animate the scaling down of a UIView, but not about its center: about a different point. As a shot in the dark, I tried translating the view, scaling, then translating back, using a series of CGAffineTransforms. But it doesn't work: it still scales about the center. Anyone know how to do this? Thanks very much. ...

zoomfactor value in CGAffineTransformMakeScale in iPhone

Hello, 1) I'm doing pinch zoom on the UIImageView , how should i decide upon the zoomfactor value, because when the zoomfactor value goes beyond 0[i.e negative value]the image is gettig tilted, which i dont want it to happen. how to avoid this situation. 2) Y is the flickring kind of rotationis happening, Y not the smooth rotat...

CONFUSING : CGAffineTransform - rotation on uibutton resizes buttonimage ?! (iPad)

hi there, i've got a strange problem using uibuttons, type custom. i'm placing 4 of those buttons on a scrollview, rotating each button by a random angle using CGAffineTransform. now it seems, that the buttons itself change size depending on the angle of rotation. can't get this problem solved :( UIGraphicsBeginImageContext(tempCtxSiz...

Is it possible to apply a CGAffineTransform to a UIImagePickerController?

Hello! I'm playing around with the camera and I've tried to transform the camera preview (being displayed by UIImagePickerController) using CGAffineTransform. So I first create the controller, set its resources and present it. I've tried applying the transformation both before and after the view is presented... When I run the code, no ...

box2d angle rotation in uiimageview for compund shapes

I want to apply an rotation to an uiimageview for shapes like "U" and "T" using compund objects and box2D, because "U" shapes are concave polygons so i can't do it using b2polygondef only. Here it is the method to make an "u" shape box when the user click on the screen // map from the world to the screen and screen to the world #define...

don't allow subviews to scale vwith view?

hi all i am scaling UIView using [UIView setTransform:CGAffineTransformMakeScale(2.0*scale.value, 2.0*scale.value)]; its works fine for me but all subviews are also scale with the UIView, but i don't want to scale all subviews of that UIView. i tried following this to stop scale subviews. [UIView setAutoresizesSubviews:NO]; UIVi...

how to rotate uibutton like this in iphone sdk.....

how to rotate uibutton like this in iphone sdk..... ...

How do I use CATransform3D on a UIView to add a specific type of perspective?

I've been creating iPhone apps for a while now, using basic transformations (rotations, scale, etc) but now I'd like to do something a little more complex. Maths really isn't my strongest point... but I was wondering how I might go about adding 'perspective' to a UIView (see the image below). I quickly mocked the screenshot up using sk...