uiimageview

UIImageView does not show Image from UIImagePickerController

守給你的承諾、 提交于 2019-12-31 06:25:11
问题 I am trying to take a picture with my app and then show it in a UIImageView that is predefined in my .xib. I have a IBOutlet UIImageView *_foto that is linked to the UIImageView in the .xib When I do the following the picture doesnt show in the UIImageView after taking a picture: - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { _foto.image = image; //Also tried set image, and resizing the image

Check Landscape/Portrait orientation in an iMessage app (extension)

ε祈祈猫儿з 提交于 2019-12-31 05:23:10
问题 Have seen a lot of solutions to check the orientation, but strangely, none works!! Below is the code snippet, override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { let screenSize = UIScreen.main.bounds let screenWidth = screenSize.width let screenHeight = screenSize.height print("Screen Width = \(screenWidth)") print("Screen Height = \(screenHeight)") if (screenWidth > screenHeight) { print("Landscape") alertView.removeFromSuperview()

Making images appear… How?

我的未来我决定 提交于 2019-12-31 04:27:11
问题 Could someone please tell me how to make an image appear when the user taps the screen and make it appear at the position of the tap. Thanks in advance, Tate 回答1: UIView is a subclass of UIResponder, which has the following methods that might help: -touchesBegan:withEvent: , -touchesEnded:withEvent: , -touchesCancelled:withEvent: and -touchesMoved:withEvent: . The first parameter of each of those is an NSSet of UITouch objects. UITouch has a -locationInView: instance method which should yield

ImageView becomes blank on Screen orientation change

不打扰是莪最后的温柔 提交于 2019-12-31 03:38:26
问题 I am using the below line to set my ImageView. Bitmap bm = Media.getBitmap(getContentResolver(), capturedImage); Bitmap bm1=Bitmap.createScaledBitmap(bm, 300, 300,true); pic.setImageBitmap(bm1); But when I rotate my mobile, the imageView becomes blank. Can anyone help me. Any help is appreciated. 回答1: Proper way to it is to save the bitmap in onRetainNonConfigurationInstance() Here is an example: http://developer.android.com/guide/topics/resources/runtime-changes.html 回答2: Try adding android

How to Crop image in Circle Shape with Grid inside Circle

一笑奈何 提交于 2019-12-31 03:05:35
问题 In my Social media app i want image Cropping Functionality, that Crop image in Circle shape plus have Grid inside Circle. I have Already Checked TOCropViewController.but there is no option for Grid. https://github.com/TimOliver/TOCropViewController 回答1: I find one solution , we can use UIGraphicsGetCurrentContext in CropView and use addEllipse method to draw Circle inside CropView. this is link For Solution. https://github.com/bhaveshbc/CircleCropView 回答2: Add a CAShapeLayer on top of your

How to bind imageSource to ImageView in MvvmCross

老子叫甜甜 提交于 2019-12-31 03:02:51
问题 I'm having trouble to bind a source with converter to an imageview in my Touch project. I found here and here how to make it in Android public class TypeToSourceConverter : MvxValueConverter<int, string> { protected override string Convert (int value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { var assetName = ((AppConstants.Type)value).ToString ().ToLower (); return "Images/" + assetName + ".png"; } } But I'm having trouble in how to use this converter in

UIImageView animationRepeatCount strange behaviour

一个人想着一个人 提交于 2019-12-31 00:46:07
问题 So i have this code that animates a set of images an unlimited amount of times just fine, however as soon as i try to limit the number of times it animates it simply does not work. No image is even displayed. Code that works: animatedMap.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"0.gif"], [UIImage imageNamed:@"1.gif"], [UIImage imageNamed:@"2.gif"], [UIImage imageNamed:@"3.gif"], //etc...]; animatedMap.animationDuration = 20.0f; animatedMap.animationRepeatCount = 0;

How can i add two uiimageview and save it to iphone photo gallery in iphone application development?

雨燕双飞 提交于 2019-12-30 11:30:28
问题 I am going straight to the point,my problem is, I have a uiview controller which is taking 3 buttons and a uiimage view.Now, When i am pressing first button i am taking image from iphone default photo gallery and placing on uiimageview. When i am pressing second button it will take another image from photo gallery and placing on previous image. Now when i will press third button those two image will add and make it one image and save in the photo album. i have done step 1 and step 2 but how

How can i add two uiimageview and save it to iphone photo gallery in iphone application development?

别等时光非礼了梦想. 提交于 2019-12-30 11:30:09
问题 I am going straight to the point,my problem is, I have a uiview controller which is taking 3 buttons and a uiimage view.Now, When i am pressing first button i am taking image from iphone default photo gallery and placing on uiimageview. When i am pressing second button it will take another image from photo gallery and placing on previous image. Now when i will press third button those two image will add and make it one image and save in the photo album. i have done step 1 and step 2 but how

UIImageView Animation too much memory consumption

女生的网名这么多〃 提交于 2019-12-30 10:34:47
问题 I have a problem with memory and images that I am animating. First thing first, I am using ARC. On my initial screen I have about 60 images to animate. I am using this code for animation: NSMutableArray *images = [[NSMutableArray alloc] init]; int animationImageCount = 61; for (int i = 1; i < animationImageCount; i++) { [images addObject:[UIImage imageNamed:[NSString stringWithFormat:@"s-%d", i]]]; } self.fullAnimatedImage = [UIImage imageNamed:[NSString stringWithFormat:@"s-%d",