uiimageview

Whats the correct way to alloc a UIImage to memory and release it iphone

Hi, Using Instruments, I keep on getting pointed to a memory leak with a UIImage. I think I'm assigning and releasing the memory correctly. The leaked object in instruments is described as NSConcreteData Is the following the correct way to assign and release a UIImage? UIImage* flagimg = [UIImage imageWithData: [NSData dataWithContent...

How to efficiently show many Images? (iPhone programming)

In my application I needed something like a particle system so I did the following: While the application initializes I load a UIImage laserImage = [UIImage imageNamed:@"laser.png"]; UIImage *laserImage is declared in the Interface of my Controller. Now every time I need a new particle this code makes one: // add new Laserimage ...

Make circular joystick

How do I make a joystick like the one in i dig it, using UIImageView's that the smaller one can be used to move around, I just really would like to know how I would get the smaller UIImageView to stay inside the larger one, I just don't know how I would do this because they are both circular. I have an Image below: ...

How do I get an UIImageView to tell me when its animation stops?

I have a UIImageView that is displaying a series of pictures as an animation. This part of the project works well. I want to display a label when the animation ends. Is there an event that the Imageview will trigger when it's animation ends? ...

Xcode iPhone Programming: Loading a jpg into a UIImageView from URL

My app has to load an image from a http server and displaying it into an UIImageView How can i do that?? I tried this: NSString *temp = [NSString alloc]; [temp stringwithString:@"http://192.168.1.2x0/pic/LC.jpg"] temp=[(NSString *)CFURLCreateStringByAddingPercentEscapes( nil, (CFStringRef)temp, NULL, ...

Why does UIImageView "darken"/saturate PNG images, and can I stop it?

I have a PNG file in a UIImageView, and next to that I have an EAGLView which displays the continuation of that same image (long story) as a texture, carved from the same original PNG. The point is, that these images, which should match up flawlessly, actually have somewhat differing color saturation. Normally I'd blame my handling of t...

Make UIImageView change its contents when user rotates the iPhone

So I have an app with a tab bar, each bar contains a UINavigationController. When user shakes the device, a UIImageView appears as a subview of the nav controller. But the app has a landscape view as well. If the UIImageView is active in portrait mode and user rotates the device, this code works: - (void)willAnimateRotationToInterfaceOr...

iPhone smooth move and pinch of UIImageView

I have an image view that I'm wanting to be able to move around, and pinch to stretch it. It's all working, but it's kinda jumpy when I start to do any pinch movements. The position will jump back and forth between the two fingers. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { startLocation = [[touches anyObje...

Adding object to an NSMutableSet automatically when it's initiated... (iphone)

Hi ... I have this problem adding an object to NSSet... The NSMutableSet *set "belongs" to main ViewController. I want to add an object (Wall) to this NSMutableSet automatically if I add it to view in interface builder... Wall is a subclass of UIImageView... Thanks :) ...

Sliding finger UIImageView

How do you detect when you slide your finger across a UIImageView? Say for example you slide your finger across it and it changes color or something. I want to be able to slide across multiple UIImageViews and have something happen... ...

Displaying indexed png- files out of NSArray on the iphone screen

Hi, i like to create an artwork counter- display on an iphone, diplaying 0 to 9. The 10 digits are 10 png- files with the numbers 0 to 9 as their artwork content. The 10 png- files are implemented by using NSArray. Following you'll find the implementation- code: zahlenArray = [NSArray arrayWithObjects: [UIImage imageNamed:@"...

[iphone sdk] changing animationDuration while animating

Hi all i want to change animationDuration of a UIImageView while it's animating ... and want to do this 60 times a second... is there any way to do this ? When I try to do it, the animation stops ... ...

Displaying Photos on iPhone

Hi all, I'm working on an iPhone app and I need to be able to display images to users. I have already gotten the code that takes the photo and stores it into the filesystem working well. Now I just need to figure out how to display the image. I've looked at the Three20 project I've read about on a few of the posts here, but it seems ...

adding UIImageView to UIScrollView throws exception cocoa touch for iPad

I am a noob at OBJ-C :) I am trying to add a UIImageView to a UIScrollView to display a large image in my iPhone app. I have followed the tutorial here exactly: http://howtomakeiphoneapps.com/2009/12/how-to-use-uiscrollview-in-your-iphone-app/ The only difference is that in my App the View is in a seperate tab and I am using a dif...

what is the proper way to set a UIImageView with a UIImage?

I have a UIImageView that starts off with an image (loading.png) specified in IB. When my app starts, a new image is downloaded from the internet to replace the existing one. I do the following to replace the image: if(object.imageView.image != nil){ [object.imageView.image release]; object.imageView.image = nil; } ...

iPhone: How to use CGContextConcatCTM for saving a transformed image properly?

I am making an iPhone application that loads an image from the camera, and then the user can select a second image from the library, move/scale/rotate that second image, and then save the result. I use two UIImageViews in IB as placeholders, and then apply transformations while touching/pinching. The problem comes when I have to save bo...

how to draw an UIImageView into -drawRect of another view?

I have several UIImageView objects which have been rotated and scaled. Because they are just background images, and represent an non-highlighted-state, I want to draw them to the canvas of the view so that I can get rid of them in memory. The view has a big bitmap anyways, so it would save a lot of memory to put them in there rather than...

How can I detect touch events on a UIImageView inside a deep hierarchy of UIViews?

I am developing a simple game on iPhone and I started with a View based application, and through the UIViewController I am loading a custom UIView that contains some more UIViews and some UIImageViews. I want to detect touch events on some of the UIImageViews, but I wasn't able so far. I've created a second project for testing purpos...

UIImageView Centering Problem.

To understand my problem let's follow this steps. Open - XCode -> New Project -> View based application. Open View Controller.xib file. Drag an image-view into viewController's view. Place that image view on center of viewController's view. Apply size of 125x125 to image-view. Take any image with dimension of 320 width & 460 height. Dr...

UIView animation along a round path?

I need to make my little guy (in a UIIamgeView) jump forward and it has to look natural. I want to know is there a way to do it with CoreAnimation (beginAnimation/commitAnimation)? I could do it by setting a point in between in the air but the movement looks not natural :P ...