uiimageview

how can i assign image name to string variable

I am new to iPhone. What i need is i have to assign image name (eg.parrot.jpg) to NSString value.i need to display image in imageview using this string variable. apporxmatly imageview.image = NSStringvarible; where NSStringVArible is image name. How can i done this? ...

Do graphic operations off-screen incur a processing overhead?

I'm trying to optimise some graphical routines for an app, and I'd like to know if off-screen animations (eg, [object startAnimating]) or just plain moving of a UIImageView by setting its rect (off-screen), have any processor overhead, or are they somehow ignored when off-screen? Many thanks for any help. ...

iOS - Should changing the frame of a UIImageView resize its image?

Can someone answer this definitively? It seems that sometimes changing the frame of a UIImageView resizes its image and sometimes it doesn't. I have loaded an image and created a UIImageView with it, sized about 100x100. Doing the following has absolutely no effect: myImageView.contentMode = UIViewContentModeScaleAspectFit; myImageView...

scaling UIImages for higher res iPhone displays using only the 3.2 SDK

Hey all, So the problem I'm having is I have a UIImageView that is 100 x 100 on the iPhone (200 by 200 on the iPhone 4). I'm retrieving an image from a server that is 200 by 200 pixels and setting my UIImageView to it. This looks fine on the iPhone, but looks blurry on the iPhone 4. I think my problem has to do with UIImage scale prope...

Fetching reference to superview from UITextField ?

Hi all, I have created three UIImageViews. I then added a UITextField to each image as a subview. When the user clicks on the text field I want to capture which UIImageView ths text field belongs to. I am trying the following code : -(void)textFieldDidBeginEditing : (UITextField *)textField { textField = retainedObject; MyPicture *...

touchesBegan method is not being called

I am trying to detect touches, but the touchesBegan method is not being called. In my ViewController, I have added the touchesBegan method. My Nib files owner is set to the correct V.C. The Nib itself consists of the view, with a scroll view and a tab bar. Nested in the scroll view is an image view, which has user interaction enabled. W...

iOS SDK 4.1 UIImageView differences?

I just upgraded to iOS 4.1 SDK and now when I run my app in the simulator one of the images (the only one really) that was working fine before the upgrade is no longer showing up in my view. I've tried removing the file and re-adding it to the project, cleaning all targets and running a build, and making changes to the XIB where the UII...

setting size of UIImageView in a UITableView cell programmatically - what is the origin?

I'm trying to set the size of a UIImageView programmatically using: [thisImageView setFrame:CGRectMake(x, y, image.size.width, image.size.height)]; I tried using x = 0, y = 0, but the UIImageView disappears. More info on why I'm trying to do this. I'm trying to display a high-res image on an iPhone 4 without using the iOS 4 SDK (only...

Continuos animation with Core Animation

Hi I want to perform a simple rotation with core animation using this code: [UIImageView beginAnimations:nil context:nil]; [UIImageView setAnimationDuration:1]; [UIImageView setAnimationRepeatCount:5]; CATransform3D rotationTransform = CATransform3DIdentity; rotationTransform = CATransform3DRotate(rotationTran...

Thread causes crash when exiting a view - result of code change to prevent UIActivityIndicatorView not displaying, UIImageView not hiding.

When an image is loading, I want to hide the old image and display an activity indicator. The following code should (IMO) work, however, the image does not hide and no activity indicator is displayed. If the image has not been downloaded previously, there is a discernable wait whilst it does download. What am I doing wrong? - (UIImage *...

UIImageView simply does not appear in custom UITableViewCell

I have a table cell to which I'm adding subviews programmatically. All the textual subviews work fine, but I can't get an image subview working at all. You'll notice that I set the background color to black. This is simply to indicate to me that the subview is indeed being initialized and positioned properly within the cell. When I remo...

How to present a "gallery" on the ipad?

Hi guys, I'm building an app for the ipad that uses the youtube api to get the video thumbnails and present them in a gallery (like the native youtube app on the ipad). Basically it's just a bunch of UIImageViews on a UIScrollView. Now the problem is that displaying all the images at once may cause the app to crash due to memory problem...

Can't set cornerRadius AND shadow on layer that has an image view stretched to its bounds?

This is stumping me. I have a UIView (call it "parent"). The bottommost subview of that view is a UIImageView (call it "child"), whose frame occupies the entirety of the "parent" bounds. I want to round the corners on the "parent" view, and set a drop shadow. I do this on the CALayer of "parent" as usual: [[parent layer] setShadowOffse...

How to overlay on top of the Keyboard in xcode

How do you overlay something, ie a UIImageView over the keyboard which pops up when editing a UITextFIeld? ...

IPhone UIImagepicker with camera showing camera roll thumbnail like default camera app?

Hello, im working in iphone's camera app, using UIImagePicker to launch the camera. Everything goes well, just a need to use the default controls showed in the camera app in iphone(little thumbnail from the last pic in camera roll and take photo buttons) and its animation(take and send the picture to the left bottom thumbnail), not defau...

how to unzip an image in the iphone code

to unzip an image file sent after gzipping it on the server side i know i have to use gzopen. i want to know if there is a more direct and simple way to do this with 'compressiontype' or something related that once i have the 'zipped image data' received from the server using NSURLconnection can i load an imageview using an easier metho...

Re-use toolbar icons in regular UIImageViews and add colors by masking

I have several icons I'm using for a toolbar, and I'd like to use some of these icons in a normal UIImageView. However, the primary background of my views is black, so the icon just shows up as a black image with a slight outline. How do I properly apply a mask so that it shows up like it does in a toolbar or tab bar? That is the image i...

Iphone SDK: Use the same UIImageView at different places in a UIIView?

Hi guys I got a problem. I would add the same UIImageView at different places to my View. So I could make 10 UIImageViews with the same image but with other names. But i got ca. 50 UIImageViews... I make my UIImageView with this code: Code: CGRect dragRect = CGRectMake(0.0f, 0.0f, 70.0, 70.0); dragRect.origin = CGPointMake(10, 300);...

Image "frame/window" on iphone.

Hi there. I have numerous photos in portrait and landscape format. I want to be able to display a "crop" of the photo in a UIImageView on the iphone. If the picture is in landscape format I want it to resize to fit the frame, if it is in portrait format I need it to resize to fit the width, and then be cropped at the top and bottom. As ...

iphone image rotate only parts of the image

Hi, I have a wheel image in the centre of my iPhone application which rotates. On top of that I put an UIImageView but I do not want this to rotate. Unfortunately it is rotating as well. How can I stop this image from moving as well please? Thanks ...