uiimageview

objective - C : Loading image from URL?

流过昼夜 提交于 2019-12-21 06:23:27
问题 Sorry for question title. I can not find a suitable title. I have UITableView content images from url when i open the UITableView the View did not show until the images loaded and that takes along time. I get the images from JSON by php. I want to show the table and then images loading process. This is code from my app: NSDictionary *info = [json objectAtIndex:indexPath.row]; cell.lbl.text = [info objectForKey:@"title"]; NSString *imageUrl = [info objectForKey:@"image"]; cell.img.image =

How Can I Rotate A UIImage and Image Data By 90 Degrees

一个人想着一个人 提交于 2019-12-21 05:17:26
问题 I have a UIImageView that contains an image. At the minute the user can click to save the image within the UIImageView to disk. I would like to make it so that the the user can click to rotate the UIImageView and also rotate the UImage within the view so that when the image is saved it keeps the new rotation. At the minute I have - (IBAction)rotateImage:(id)sender { float degrees = 90; //the value in degrees self.imagePreview.transform = CGAffineTransformMakeRotation(degrees * M_PI/180); }

How Can I Rotate A UIImage and Image Data By 90 Degrees

半世苍凉 提交于 2019-12-21 05:17:16
问题 I have a UIImageView that contains an image. At the minute the user can click to save the image within the UIImageView to disk. I would like to make it so that the the user can click to rotate the UIImageView and also rotate the UImage within the view so that when the image is saved it keeps the new rotation. At the minute I have - (IBAction)rotateImage:(id)sender { float degrees = 90; //the value in degrees self.imagePreview.transform = CGAffineTransformMakeRotation(degrees * M_PI/180); }

User Interaction on a UIImageView

房东的猫 提交于 2019-12-21 05:00:29
问题 I have a number of UIImageView which have buttons on top of them. I would like to enable user interaction on the UIImageView behind these buttons. I see the option in IB, but would like to know how to trigger some code when the UIImageView is actually touched. How does one do this and how is it set to enabled and disabled in the code rather than IB? Thanks 回答1: how to trigger some code when the UIImageView is actually touched. You have two options: Create an instance of UITapGestureRecognizer

CALayer performance vs. UIImageView performance

若如初见. 提交于 2019-12-21 04:49:07
问题 I'm noticing that some of the things that I do with images in my app, I could be doing with CALayer properties instead (i.e. borders, shadows, gradients, and so on). So I'm wondering, in general, is it a better idea to use CALayers and such, or just do all that stuff in photoshop and use UIImage(View)s for whatever I need? Scrolling performance has been kinda slow with drop shadows and stuff, so I'm basically trying to find every little optimization that I can. Background information: I'm

How can i zoom in and out in a UIImageView without UIScrollView?

北城以北 提交于 2019-12-21 04:38:12
问题 I'm developing an app for iOS 4.2, iPhone, in this app I download images and I save them in the internal storage (NSDocuments). Well, then I show the first image in a UIImageView. The user can drag their finger on the UIImageView (TouchesMoved), when the user do that, I load other image. If the user drag down, I load one image, if drag up, i load other, and also with right and left. This is all done. But I want to implement zooming. This is my code until now: initialDistance --> is the

Scaling UIImageView to fit screen width

你说的曾经没有我的故事 提交于 2019-12-21 04:18:09
问题 I have an UIImageView created using Storyboard inside UIViewController . I'm trying to rescale the width of the image to fit the screen width and rescale height proportionally: [fImage setImage:[UIImage imageNamed: @"f2345.jpeg"]]; [fImage sizeToFit]; fImage.contentMode = UIViewContentModeScaleAspectFit; CGRect frame = filmImage.frame; frame.size.width = [[UIScreen mainScreen] bounds].size.width; // Alternative way to do the similar thing - gives the same result in my case // frame.size.width

AFNetworking - Fade animation on image while scrolling UITableView

纵然是瞬间 提交于 2019-12-21 04:05:00
问题 I have a Table View which displays images using lazy loading from AFNetworking with a placeholder image. I'm trying to accomplish a way to fade from the placeholder to the image when it's loaded. My code here works, but if an image loads while scrolling the table, everything looks odd and the table stops scrolling. Same thing happens to a Horizontal scroller with the same effect. Here's the code I'm using inside cellForRowAtIndexPath [cell.hotelImage setImageWithURLRequest:[NSURLRequest

How to change UITableViewCell Image to Circle in UITableView

ぃ、小莉子 提交于 2019-12-21 03:18:25
问题 My code works for the most part. The issue I am having is the images start out as square, and change to circle when I scroll the table or refresh it. What am I missing? Here's my code: cell.imageView.layer.cornerRadius = cell.imageView.frame.size.width / 2.0; cell.imageView.layer.borderWidth = 3.0; cell.imageView.layer.borderColor = [UIColor colorWithRed:157.0/255.0 green:34.0/255.0 blue:53.0/255.0 alpha:1.0] .CGColor; cell.imageView.clipsToBounds = YES; NSDictionary *tweet = (self.results)

How to crop scanned barcode using Zbar?

大城市里の小女人 提交于 2019-12-21 03:01:28
问题 I am using below code to scan bar code using Zbar sdk. I go through related question of stackoverflow but that answer is not working for me. Till now I have done, -(IBAction)btnCLick { ZBarReaderViewController *reader = [ZBarReaderViewController new]; reader.readerDelegate = self; reader.supportedOrientationsMask = ZBarOrientationMaskAll; ZBarImageScanner *scanner = reader.scanner; [scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:0]; [self presentModalViewController:reader animated