uiimageview

Flicking through pages / photos with UIImageViews (similar to Facebook photos app or home screen)

元气小坏坏 提交于 2019-12-09 23:23:39
问题 First of all, I'd like to point out that I'm not asking for code. I'm just asking for the sort of things I'd need to do to get this to work, as right now I've absolutely no idea. Here's what I want to do: Similar to viewing someone's photos in the Facebook app, I'd like to display an image (UIImageView) on the screen. When the user flicks it left (off the screen), the next photo in the album appears (I guess I could use some sort of array of images?). Flicking right moves to the previous

Released app shows blank screen, but not in debugger

馋奶兔 提交于 2019-12-09 18:50:39
问题 I have this app, originally written for iOS 2.x. I recently needed to add a small feature, and was forced to make the app, that survived many iOS upgrades without any problem,iOS5 compliant. Only after testing and submitting the app, I got reports from the 300.000+ user base, that the app doesn't work on second generation iPod Touch with iOS 4.2.1. I tested on the first gen iPod touch, and that ran just fine. Interestingly, now that I finally found a sec gen iPod, in debug mode on the device,

Need help about contentMode and autoresizingMask of UIImageView

自作多情 提交于 2019-12-09 18:10:02
问题 i have picture like this image it will present on Landscape Mode so if rotate device to Portrait, how to present image like this 回答1: Use an UIImageView with these settings: imageView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); imageView.contentMode = UIViewContentModeScaleAspectFit; 回答2: It looks like what you're trying to do is clip the image on the right, while leaving the top, left, and bottom the same. Two things to try: 1) Subclass UIView and

setting UIImageView content mode after applying a CIFIlter

陌路散爱 提交于 2019-12-09 14:41:00
问题 Thanks for looking. Here's my code CIImage *result = _vignette.outputImage; self.mainImageView.image = nil; //self.mainImageView.contentMode = UIViewContentModeScaleAspectFit; self.mainImageView.image = [UIImage imageWithCIImage:result]; self.mainImageView.contentMode = UIViewContentModeScaleAspectFit; in here _vignette is correctly set up filter and image effect is applying to the image correctly. I'm using a source image with resolution 500x375. My imageView has almost iPhone screen's

Create UIImage cutout

Deadly 提交于 2019-12-09 13:58:21
问题 I have a UIView containing 2 UIImageViews - a frame and a picture behind the frame. The frame is not a rectangle - it's an irregular shape. The user can manipulate the picture behind the frame (zoom, rotate and pan) and when they're done, I want to capture the cutout of the picture within the frame - not the picture and the frame together. Is there a way I can do this? I've managed to flatten the picture and the frame together in to a single image as below, but I only want the picture, which

How to merge multiple UIImageViews into one UIImage

安稳与你 提交于 2019-12-09 13:19:15
问题 I have 2 UIImageViews laying on top of each other ( picture + overlay frame ) and I want to save them to the camera roll as 1 picture. How should I combine those 2 UIImageViews so that I can call the UIImageWriteToSavedPhotosAlbum function, using a 'result' UIImage? 回答1: I don't have my Mac nearby at the moment, but I have done this before. The process is that you'll render the UIImageView s into a bitmap context, then create a CGImage from that context that you can use to create a new

Simple UICollectionView to show images behaves odd: Some Images are displayed correct, some at wrong position, some missing at all

ぐ巨炮叔叔 提交于 2019-12-09 07:59:22
问题 I want to show images in a grid on iPhone using a UICollectionView, showing 3 images a row. For a "dead simple test" (as I thought), I've added 15 JPG images to my project, so that they'll be in my bundle and I can load them simply via [UIImage imageNamed:...]. I think I've done everything correct (setting up & registering UICollectionViewCell subclass, use of UICollectionViewDataSource Protocol methods), however, the UICollectionView behaves very weird: It shows only a few of the images in

How to pause a UIImageView animation

南笙酒味 提交于 2019-12-09 07:41:25
问题 I have an animation that I'm displaying using a UIImageView: imageView.animationImages = myImages; imageView.animationDuration = 3; [imageView startAnimating]; I know I can stop it using stopAnimating, but what I want is to be able to pause it. The reason is that when you call stop, none of your animation images are displayed, whereas I would like the last one that is up at the time when I hit a button to stay up. I have tried setting the duration to a much larger number, but that causes all

Interface for cropping operation: user-resizeable rectangle drawn on image

不羁岁月 提交于 2019-12-09 07:16:21
问题 I am trying to figure out a way to crop a UIImage as it's done in Photoshop Express: So basically you just touch and drag the corners to resize the rectangle, then you tap the check button and it crops the image. Now I have the crop part done -- I made a method that crops an image from a CGRect but I am having problems with this resizable rect. Everything I have tried has not worked, and it's making me crazy, because I know it is probably just something easy. Has anyone ever done anything

Autolayout UIImageView with programatic re-size not following constraints

筅森魡賤 提交于 2019-12-09 07:03:43
问题 Sorry for the bother but I'm trying to lazy load several imageViews and then resize it proportionately to the content in a UITableView. I'm also trying (Unwisely perhaps?) to use Autolayout basically for the first time. And I'm not understanding why the constraints aren't working in this case. Here's the code that I'm using to resize the UIImageView after I've loaded the proper image into it. // Scale the image view and return it. - (UIImageView *) scaleImageViewForScreenWidth:(UIImageView *