uiimageview

Strange UITableViewCellStyleSubtitle + [cell imageView] behaviors

拈花ヽ惹草 提交于 2020-01-02 11:20:14
问题 This question's been bugging me for a month and i've been resisting posting about it, but I can hold out no longer. Here's what's going on: I have an app with UITableViewCell s, all initialized as UITableViewCellStyleDefault . For each one, I am setting the image view's image using the excellent SDWebImage package, which extends UIImageView to have a method for [UIImageView setImageWithURL:(NSURL*)url placeholderImage:(UIImage*)image]. The problem is that the images are showing up more narrow

Making an image follow a pre defined path in iPhone?

断了今生、忘了曾经 提交于 2020-01-02 11:04:29
问题 I am looking for some way to make an image (a ball) move along a predefined path in iPhone. My intention is to create a ball movement similar to the labyrinth movement. I understand there is a way to create paths programmatically using CGPath. But I believe it is difficult to create complex paths. Is there a better and easier way to create a path out of an image (which will look or represent a path) and make the image (ball) movement constrained in this path ? Thanx in advance for help ...

Render a full UIImageView to a bitmap image

余生颓废 提交于 2020-01-02 09:57:27
问题 I know how to render a normal UIView to a bitmap image: UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, 0.0); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *bitmapImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); The problem is that if view is a UIImageView with a stretched resizable image returned from resizableImageWithCapInsets: , bitmapImage gotten this way is the original image — the un-stretched one — instead of the

Animate a UIImageView from center of the UIImageView

核能气质少年 提交于 2020-01-02 08:51:00
问题 I have a UIImageView that should animate from size (0,0) --> (93,75) I have the following [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationOptionTransitionNone animations:^{ imgButton.layer.anchorPoint = CGPointMake(imgButton.bounds.size.width/2, imgButton.bounds.size.height/2); CGRect btnFrame = imgButton.frame; btnFrame.size.width = 105; btnFrame.size.height = 85; imgButton.frame = btnFrame; } completion:^(BOOL finished) { [self animageButton2:imgButton]; }]; This is working

ios - SizeToFit on UIImageView not working

回眸只為那壹抹淺笑 提交于 2020-01-02 06:19:13
问题 I have a UIImageView which loads in images from the documents directory on the ios file system . The problem is that when I call [imageView sizeToFit]; It does not work. I think it is because the image hasn't loaded fully at that point and so the sizeToFit part is called before it has the image width & height. Could someone point me in the direction of a fix please. Here is my code: imageView.contentMode = UIViewContentModeScaleAspectFit; imageView.image = [UIImage imageWithContentsOfFile:

ios - SizeToFit on UIImageView not working

偶尔善良 提交于 2020-01-02 06:18:15
问题 I have a UIImageView which loads in images from the documents directory on the ios file system . The problem is that when I call [imageView sizeToFit]; It does not work. I think it is because the image hasn't loaded fully at that point and so the sizeToFit part is called before it has the image width & height. Could someone point me in the direction of a fix please. Here is my code: imageView.contentMode = UIViewContentModeScaleAspectFit; imageView.image = [UIImage imageWithContentsOfFile:

Unable to show a *.gif file in a UIImageView in swift

天涯浪子 提交于 2020-01-02 03:48:11
问题 I have a *.gif file that I want to show in a UIImageView . I have tried the library FLAnimatedImage, code below. Result is just a static image. class LoginVC: UIViewController, UITextFieldDelegate { @IBOutlet weak var img_popup: FLAnimatedImageView! var img_popupraw: FLAnimatedImage = FLAnimatedImage(animatedGIFData: NSData(contentsOfFile: "ShitTalk_LoadingAnimation.gif")) override func viewDidLoad() { img_popup.animatedImage = img_popupraw } } Open to any alternative ways to show animating

Images not all showing up on simulator but shows in storyboard

不羁岁月 提交于 2020-01-02 01:20:06
问题 I am pretty new to iOS development and I was poking around in storyboard in Xcode 4.5.2. I started a new tab bar project (5 tabs) and then dropped in some images (UIImageViews objects) to them, everything looked good and the build came out fine on the simulator but not all the images are showing up. The same image would be showing on the Firstviewcontroller but it won't show on another viewcontroller. And I can't seem to add new image objects into the firstone (meaning i can place it in the

How to zoom into a selected area of image in iPhone?

情到浓时终转凉″ 提交于 2020-01-01 17:27:12
问题 I have an ImageView when clicked on that imageview, transparent circle should be created and again when double clicking on that circle, particular Image in that circle area should be zoomed.Any suggestion would be appreciated. 回答1: I think this code will helpfull to you - (id)initWithImage:(UIImage *)image { self = [super initWithImage:image]; if (self) { [self setUserInteractionEnabled:YES]; UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:

iPhone/Xcode: UIImage and UIImageView won't get with the program

懵懂的女人 提交于 2020-01-01 17:01:20
问题 I am attempting to save and load a UIImage to and from the iPhone documents directory after the image is picked from the iPhone Photo Library. It is able to do so, but for some reason, when I load the image, it rotates it 90 degrees counterclockwise. Here is my saveImage and loadImage methods: Save Image: - (void)saveImage: (UIImage*)image{ if (image != nil) { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory =