uiimageview

How to use NSUndoManager with a UIImageView or CGContext

I have an app that uses cgcontext to draw things onto a UIImageView that the user draws using touch events, and I want to be able to undo the drawings made by the user. Edit: I am trying to use my touchesBegan to save theUIImage at the begining of a touch to the NSUndoManager And then how do I use it to undo using a UIAlertView. Mea...

Animating a UIImageView tint

Similar to this previous question, I want to apply an arbitrarly-coloured tint to an arbitrary image (a UIImageView). However, I want the tint to fade away over N seconds of time, to have a "pulse" effect. I'll be triggering the pulse every M seconds. While I think I could rig up a naive solution using an NSTimer to change the tint, I t...

Getting pixel data from UIImageView -- works on simulator, not device

Based on the responses to a previous question, I've created a category on UIImageView for extracting pixel data. This works fine in the simulator, but not when deployed to the device. I should say not always -- the odd thing is that it does fetch the correct pixel colour if point.x == point.y; otherwise, it gives me pixel data for a pixe...

Trying to get a UIImageView to stop moving when it hits the bounds of the screen...help!

I am making a simple game app where you press a left/right button, and a UIImageView moves and animates. Here is the problem - I want the UIImageView to stop moving when it touches self.view.bounds.size.width How do I do this? Here is the existing code : - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouc...

How do I save and read an image to my temp folder when quitting and loading my app

I want to save and read a UIImage to my temp folder when my app closes and then load and delete it when the app loads. How do I accomplish this. Please help. ...

UIImageView responds to partial touchesBegan code before the 3rd click. WHY??????

On simulation, after i load the UIView that contains 52 UIImageView; it takes at least 3 clicks before the animation begins. On the first 2 clicks, the touchesBegan is invoked. i know that because the NSLog(@"Just before for loop); was displayed on the console. However the console states that the cardAnimationArray is empty in the first ...

How would I save a CGContext into an NSUndoManager

I want to be able to save a CGContext into my NSUndoManager using these methods - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self.view]; currentPoint.x = currentPoint.x; currentPoint.y = currentPoint.y; ...

get image from previous controller

Hi, i am getting a picture from the iPhone's camera in one nib file (getPhoto.xib), where I save it into the camera library and also display it in an UIImageView (image1). Then, I have a next button which loads a different nib file (naming.nib) where the user can add a name for the image. How I can access the image from the first nib fil...

Images appear at wrong position during view animation

Hi Guys, I have got a problem. I have made view including a scrollview. In the scrollview I am adding lottery balls with labels. I have setup the animation between views and when this view with the balls animated, the balls are at the same position (left upper corner of the scrollview), until the animation is fully finished. Than the b...

How to draw nil using cgcontext

I want to draw nil instead of the colors, because in the end I want the code to erase a section of the UIImageView in order that you can see what is behind the UIImageView. - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self.v...

UIImageView animations crash when run on iphone device

Hi, I'm doing a fairly simple animation with two UIImageViews that works fine on the simulator, but the animation crashes the app when its run on the iphone device. The animation for each view involves 13 png's and just starts the animation with an animation duration of roughly 2.25 seconds. Both animations are run at the same time wi...

Why does my image in a UIView object go beyond the borders?

Hi, so I have a UIImageView in a UIView but when I run it in the iPhone Simulator, the image goes beyond the boundaries of the UIView. What's wrong...? ...

Problem adding subviews (UIButtons) to subclass of UIImageView

I'm adding a custom button/keypad to my application. Thus far, I have a UIImageView subclass that contains an animation that slides it from the bottom of the screen, and then back down when the user no longer needs it. I'm having trouble adding UIButtons to this UIImageView, however. Since this is a subclass of UIView, I'm attemptin...

Several UIImageViews in UIScrollView and crashes

I have a problem with a photo viewing application I've written. I have a UITabBarController with a UINavigationController inside. The UINavigationController initially displays a UITableView. On selection it pushes another UIViewController (Individual photo album) along with an NSArray of photos. This Controller contains a UIScrollVie...

transparent subview over UIimageView

as i am a new in iphone world ,i need some startup help to achieve this kind of design? background of view which has button should be transparent so that user can see product image in back. http://www.freeimagehosting.net/uploads/cb58b72480.jpg let me know if it requires more explanation? thanks. ...

How to populate a UIScrollView with UIImageView's lines up in a row

I need some code on how to make a UIScrollView that contains UIImageViews lined up like the iPhone photo's app that comes with the phone. ...

How do I get the pixeldata of an imageView?

Hi, all! I want to get pixeldata of an imageView (i.e. all the pixels occupied by the imageView in an NSMutableArray) which I need in order to detect collisions between two imageViews. Can anybody please help me? ...

UIScrollView in landscape mode with Aspect Fill

In a UIScrollView I have a UIImageView with the contentMode set to Aspect Fill. When I rotate the simulator to landscape mode the UIImageView shows the center of the image and I cannot scroll upwards to see the whole picture. How do I fix this so that when I rotate the iPhone I instead see the top of the image (but still scaled with As...

UIScrollView not scrolling

I'm loading a UIScrollView with UIImageViews. imageViews below is an NSMutableDictionary of UIImageViews. The scrollview is an IBOutlet with scrolling and paging enabled. The loop adds two images. However, I only ever see the first image in the scrollview and am not able to scroll. Is there something else I need to enable for scroll...

How do I concatenate two images in objective c?

I have two UIImageView's, and I want to concatenate them both to be one UIImageView. To let you know, the images have some transparency to them so you will see both of them. Als they are the same size. ...