uiimageview

UIScrollView squashes UIImageView image

不问归期 提交于 2019-12-08 09:43:48
问题 I have the following code in ViewDidLoad and it squashes my UIImage/ UIImageView. I want the image to fill the UIScrollView. [super viewDidLoad]; _imageHolder = [[UIImageView alloc]initWithFrame:self.view.frame]; _scrollView = [[UIScrollView alloc]initWithFrame:self.view.frame]; [_scrollView setBackgroundColor:[UIColor purpleColor]]; // Tell the scroll view the size of the contents self.scrollView.contentSize = self.view.frame.size; self.scrollView.delegate = self; self.scrollView

How to change an UIImageView into a custom cell

不问归期 提交于 2019-12-08 09:12:04
问题 I have an UIImageView in a custom cell ( @IBOutlet var imageSquadra: UIImageView! ) and in the TableViewController I initialize this imageView: let squadra = DataManager.sharedInstance.arrayCori[indexPath.row] cell.imageSquadra.image = squadra.sfondo1 Now I need to change the image touching up inside the cell with an other image, and return to the previous image touching up into an other cell. Is it hard to do? EDIT: or if was easier, would be fine apply a CAFilter like a shadow to the image.

ios- zoom and rotate a masked UIImageView [closed]

你离开我真会死。 提交于 2019-12-08 09:07:35
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm new to iOS and need to have the needs below. Please give me some directions on how to do this. Thanks! Have an image(source) masked by another image (frame) User can drag,zoom, rotate the source image. The frame image keeps still. I know how to use CGImageCreateWithMask and how to put uiimageview inside a

Issue while zooming uiscrollview which is used to resize and crop Image in IOS

浪尽此生 提交于 2019-12-08 08:36:47
问题 I'm developing an App which has (image saving) in one of the views, I have three different sizes which I want my images to be saved in after the user zoom and scale the image which is captured from the scroll view when the user click on save. Below is my Codes: After the style is selected the width and height is set depending on type chosen and then the scrollview creating method called -(void)viewDidAppear:(BOOL)animated{ if(!([getColor length] == 0)) { [theColored setHidden:NO]; [imageView

Accessing images from nsbundle

时光怂恿深爱的人放手 提交于 2019-12-08 08:26:13
问题 I have a framework which is trying to access xib's and images from a bundle. I am able to access the xib fine but unable to load the images in UIImageView. I even check if the file exists and the console output is yes... Any idea how to load the image? Code to load xib in the framework viewcontroller file self = [super initWithNibName:@"ViewController_iPad" bundle:[NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"MyBundle" ofType:@"bundle"]]]; Code to load images - (void)

UIImageView not updating image

天涯浪子 提交于 2019-12-08 08:16:16
问题 I am trying to make a simple "Profile" view that allows the user to change his picture. the image picker loads the gallery successfully and i choose the new image then write it to documents directory to load it in next launch, the problem is the imageview is not refreshing with the new image until i exit the app and relaunch again (only viewDidLoad works but viewWillAppear is loading the old image although it is overwritten!) any ideas? import UIKit class Profile: UIViewController

How to set image in custom rounded corner image view in android

拟墨画扇 提交于 2019-12-08 08:03:54
问题 hello am working in android camera application i want to show clicked image in rounded corner image view how can i implement these.i posted a image given below .Please assist me ? Imageview is look like this 回答1: Use the custom ImageView class below. public class RoundedImageView extends ImageView { private Path mMaskPath; private Paint mMaskPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private int mCornerRadius = 10; public RoundedImageView(Context context) { super(context); init(context); }

Strange behavior from affine transform rotation on iOS

我是研究僧i 提交于 2019-12-08 07:36:02
问题 I want to do a fairly simple rotation of a UIImageView. Basically I have an image of a wheel in a perfectly square image and I want to rotate it under animation. So I tried this: - (void)testButtonPressed:(id)sender { NSLog(@"Test button pressed"); CGAffineTransform transform = CGAffineTransformMakeRotation(1.0); [UIView animateWithDuration:10.0 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ dial.transform = transform; // "dial" is a UIImageView } completion: ^(BOOL finished){

iOS Swift Detecting Image Rotation

南楼画角 提交于 2019-12-08 07:21:29
问题 I have an app which animates a needle on a meter as long as the user is pressing on the screen. When the finger is lifted I need to know the rotation angle of the needle. I remove all animations as soon as the finger is lifted but I can't figure how to get the current rotation angle of the needle. 回答1: It is quite simple, this is the full solution: Sample Setup: imageView.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 6) // just to test (it is 30 in degrees and 0.523598775598299 in

How to add blur effect into UIImage with Swift? [duplicate]

两盒软妹~` 提交于 2019-12-08 05:44:25
问题 This question already has answers here : Swift Gaussian Blur an image [closed] (2 answers) Closed 2 years ago . I'd like to add blur effect in UIimage, not UIImage View. I can add blur effect into uiimage view just like this: let blurEffect = UIBlurEffect(style: UIBlurEffectStyle.light) let blurEffectView = UIVisualEffectView(effect: blurEffect) blurEffectView.frame = img.bounds blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight] img.addSubview(blurEffectView) But, I really