uiimageview

iOS using default color on image rendered as template

℡╲_俬逩灬. 提交于 2019-12-24 14:11:37
问题 I've a set of images in the asset catalog, and every image has a own color. I need to show this icon all in gray when the device is offline. The problem is: when I set template mode on image in asset catalog I can't be able to use the image in it's default color set. I would like to avoid to generate double icons. Ideas? 回答1: If the image is solid without background, you can tint it. UIImage *image = [UIImage imageNamed:@"name"]; if (online) { imageView.image = image; } else { imageView.image

UIScrollView zoom removes transform from UIImageView

醉酒当歌 提交于 2019-12-24 14:01:10
问题 I have the following code that allows a user to rotate an image on screen by pressing a button. self.imageView.transform = CGAffineTransformRotate(self.imageView.transform, rotationAmount); This image is sitting inside of a UIScrollView which enables a user to zoom in on the photo. The problem is that when a user zooms the transform is reset. I can store the value of the transform and then re apply it after zooming but the image appears as though it is bouncing between the rotated version and

Show photo with SCRATCH OUT EFFECT by finger

天大地大妈咪最大 提交于 2019-12-24 12:34:44
问题 I need your help to know how to create an iPhone application to show a photo with SCRATCH OUT EFFECT. Something like the effect in this flash tutorial http://www.tutorial5.com/content/view/115/46/ Please help. Thanks. 回答1: You can have a look at the following post on how to create a blurred image effect, I don't think it's the best & fasted method, but it might get you started: UIImage blur 回答2: You can implement the scratch out effect by using CoreGraphics. Subclass UIView for the

Compressing an NSKeyedArchiver file that included UIImageView with loaded image

血红的双手。 提交于 2019-12-24 11:37:11
问题 I have a view with an UIImageView. It was loaded with either jpg or png image format. Says the jpg image version has a data size of 100k. I then used NSKeyedArchiver to save my view to a file. The size of the file is getting about 3MB. If I used the png version of the image, the archived file is still around 3MB. I then used zlib to compress the archived file. But it does not seem to have much effect. Anything I can do to get it back to close as much as possible the 100k area? BTW: If I used

UIImage from URL difficulty

梦想与她 提交于 2019-12-24 11:35:45
问题 The following code works to load a UIImage from a URL. However, when I try to load an image from Craigslist, the image does not work. I have verified the craigslist imagePath is working. NSURL *imageURL = [NSURL URLWithString:@"http://images.free-extras.com/pics/c/car-530.jpg"]; NSData *data = [NSData dataWithContentsOfURL:imageURL]; UIImage *img = [[UIImage alloc] initWithData:data] ; self.imageView.image = img; I have tried this NSURL *imageURL = [NSURL URLWithString:@"http://images

Crash Log - need help to find the crash [closed]

喜夏-厌秋 提交于 2019-12-24 11:08:12
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . I am getting the following crash log and i can't find what makes the app cash. Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000,

UIImage send to email

我与影子孤独终老i 提交于 2019-12-24 10:55:56
问题 In my program modify an image at run time and I have to send it by e-mail. Not required to keep in the device. Any suggestions? I use this but not works because the image is not saved in mi iphone =( - (void)emailImage{ MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; // Set the subject of email [picker setSubject:@"MI FOTO FINAL"]; // Fill out the email body text NSString *emailBody = @"Foto final"; // This is not an HTML

UIScrollview with two images - Keeping 1 image zoomable and 1 image static (fixed size)

会有一股神秘感。 提交于 2019-12-24 09:36:57
问题 I have a UIView which contains a zoomable UIImageView and also another semitransparent UIView on top of that. What I am trying to achieve is to be able to zoom the UIImageView while keeping the semitransparent view static and not zoomed. If I add the semitransparent UIView on top of the UIImageView (which is added to the UIScrollView ), everything zooms. However, if I add both as subviews to the base UIView , the touches only get tracked is the semitransparent UIView since its the last one

images from an array

假如想象 提交于 2019-12-24 09:26:19
问题 i create an nsmutableArray and i add for it an images. also i create an imageView that i want to show the images from the array, i tried to use animationImages but i nothing is happened, how can i fix it? here is my code: //Numbers images UIImage *numberZero = [UIImage imageNamed:@"numberZero.png"]; UIImage *numberOne = [UIImage imageNamed:@"numberOne.png"]; UIImage *numberTwo = [UIImage imageNamed:@"numberTwo.png"]; UIImage *numberThree = [UIImage imageNamed:@"numberThree.png"]; UIImage

UIView is not showing up in UIScrollView

淺唱寂寞╮ 提交于 2019-12-24 09:25:52
问题 I am currently dynamically adding a UIImage to my UIScrollView object and everything is working as intended. I need to add extra functionality now (a UIActivityIndicator in the center of the image when it is loading from the internet, and a label underneath) so I thought why not create a custom View which has all of these laid out as I need them to be, and then just load it into the scrollView. I have encountered a problem though, when I add it to the scrollView, nothing shows up. Here is