uiimageview

Scrolling png with text & alpha on top of a static UIImageView

I have a view controller that has a view structure as follows: FilesOwner FirstResponder View ImageView (.jpg) ScrollView ImageView (.png) The text in the innermost imageview has white text and clear (alpha) all around. I want to scroll the innermost imageview, and see the background image (the .jpg) behind it. Its not wo...

How to ask UIImageView if MultipleTouchEnabled is "YES"

I have created a few UIImageViews programmatically, but I have a feeling that even though I setMultipleTouchEnabled to YES during the setup, it is not getting set properly and it's leading to multi-touch issues. My question is, within touchesBegan how do I go about asking the UIImageView that was touched if it has MultipleTouchEnabled o...

Problem in Rendering images in UIImageView in iPhone programming.

Hello, I've a UIViewController and a UIImageView, on UIImageView i want to flip between 2 images, which i'm not able to achieve. This is the code i've written, plz correct me if i'm wrong. UIViewController* VC = [[UIViewController alloc]init]; VC.view.backgroundColor = [UIColor redColor]; UIImageView* imgView = [[UIImageView alloc]ini...

How to check if there is an image present in the image view?

I am new to iphone development. I want to check for a condition whether the image is present in the image view? I have created a image view such as UIImageView *subview = [[UIImageView alloc] initWithFrame:CGRectMake(10.0f, 6.0f,50.0f, 50.0f)]; How to check whether the image is present in the image view?Please help me out.Thanks. ...

How to show specific area in UIImageView from iPhone?

If I have a image size 1024*768, but I want to show a 100*100 square located on 200, 200. What is the simplest way to do it? Thz u. ...

How to let the pageController control the UIImageView?

I want a UIImageView swipe left, the UIImageView will change the image, at this time, the pageController +1, if swipe right, the pageContoller -1, and display the previous image... ...How can I implement it? Any simple code? thz u. ...

How to change the UIImageView image content by code?

I use this to assign image: UIImage *img = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"myImage" ofType:@"png"]]; CGRect cropRect = CGRectMake(175, 0, 175, 175); CGImageRef imageRef = CGImageCreateWithImageInRect([img CGImage], cropRect); imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 175, ...

Why I can't update my UIImageView?

I make my own UIImageView, like this: @interface MyImageView : UIImageView{ } And I have the initWithFrame like this: - (id)initWithFrame{ if( ( self = [ super initWithFrame: CGRectMake(0, 0, 175, 175) ] ) ) { UIImage *img = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"myImage" ofType:@"png"]]...

Animation on the iPhone - use image sequence or rotation?

I am creating a basic animation for my iPhone app. I have a choice to make between 2 different types of animation. I can use this... NSArray *myImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"myImage1.png"], [UIImage imageNamed:@"myImage2.png"], [UIImage imageNamed:@"myImage3.png"], [UIImage imageNamed:@"myImage4.gif"], n...

Preserving alpha issues with loaded UIImages - how to avoid discarding alpha values on import?

My application lets the user save/load images with alpha values to the camera roll on the device. I can see in the Photos application that these images are appropriately alpha'd, as alpha'd areas just appear black. However, when I load these images back into the application using the valueForKey:UIImagePickerControllerOriginalImage messa...

CGContextSetRBStrokeColor to replace, not add, for alpha?

I use CGContexts to allow the user to draw in my application, here's an example: CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); CGContextSetLineWidth(UIGraphicsGetCurrentContext(), size); CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(),r,g,b,a); I want the user to have an "eraser" tool that a...

How do I make UITableViewCell's ImageView a fixed size even when the image is smaller.

I have a bunch of images I am using for cell's image views, they are all no bigger than 50x50. e.g. 40x50, 50x32, 20x37 ..... When I load the table view, the text doesn't line up because the width of the images varies. Also I would like small images to appear in the centre as opposed to on the left. Here is the code I am trying ins...

How can I make image brighter (more light as flash effect) using Core Graphics

How can I get flash effect for images got from Camera? After I got image from camera (it shows in UIImageView) and before saving it as a file I'd like to lighten (in some cases) image by pressing Flash button. Is it possible by using Core Graphics ?? ...

UIImageView Animation Question

Is it possible to run an NSArray UIImageView Animation that plays pictures 1 through 5 only once, plays pictures 5 through 7 on repeat over and over (while holding down IBAction button) then when button is released it plays 7-10 only once? ...

Combining multiple UIImageViews and preserve resolution

I am designing an application where a user places multiple UIImageViews one over another. When the user decides to save this to photo album, I have to combine all these UIImageViews and save it to Photo Library. While combining them I need to preserve their positions, resolutions, zorder. The approach I tried I was to have a parent UIVie...

How do you update a secondary view?

Perhaps there's a better way to set this up so I'm open to suggestions. But here's what I'm doing. I have a main UIView. On top of that I have a UIImageView and another UIView. When the UIImageView changes, I want to change the second UIView. So I have a class for it and the IB object's type is set to the class. In the .m of that class...

Show image from url in uiimageview

I try to show a image in my iphone app but it doesn't show. I connect in IB and I check to show a local image, it workd good. I also check the url from image and it is ok. I use the next code: NSURL *imageURL = [NSURL URLWithString: aVideo.urlThumbnail]; NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; UIImage *image = [UII...

How do I properly handle rotation of a UIScrollView containing UIImageViews?

I'm developing an image viewer, much like the Photos App. It's a UIScrollView with paging enabled with images loaded from the internet, so I've adapted portions of the LazyTableImages sample. The Scroll View and each ImageView inside of it have all of their autoresize mask flags set. When I first observed how resizes were happening du...

iPhone - user interaction with programmatically added UIImageView

So I'm trying to add UIImageViews programatically (in this case I don't have the option of doing it in IB) and I want to be able to refer to them and manipulate them in the -touchesBegan and -touchesMoved methods. I've added the images like this: UIImageView *newPiece = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[NSString s...

iPhone: Cell imageViews repeating when loaded from url

I'm developing a demo RSS reader for iPhone. I obviously have a tableview to display the feeds, and then a detailed view. Some of this feeds have a thumbnail that I want to display on cell.imageview of the table, and some don't. The problem is that when scrolling the table, loaded thumbnails start repeating on other cells, and I end up ...