uiimageview

Marquee Animation UIimageView blur

这一生的挚爱 提交于 2019-12-13 21:12:16
问题 In my app images are in Marquee effect (HTML) . so i set the x point of image by using NSTimer but it implemented successfully but the image show some blur. how i remove this blur effect ? int x=0; ImgArray=[[NSMutableArray alloc] initWithObjects:[UIImage imageNamed:@"keyframe1.png"],[UIImage imageNamed:@"keyframe2.png"],[UIImage imageNamed:@"keyframe3.png"],[UIImage imageNamed:@"keyframe4.png"], [UIImage imageNamed:@"keyframe5.png"],nil]; imgView=[[UIImageView alloc]initWithFrame:CGRectMake

Receiving Memory Warning in iPad after drawing lines on large size image with CGContextRef

ⅰ亾dé卋堺 提交于 2019-12-13 21:06:56
问题 I am drawing lines on UIImage by using CGContextRef.My images are very large in resolution like 3000x4500.It doesn't give me memory warning if I draw a single line but if I would draw more than one line then it gives memory warning and after that my app crashes.Tried to release the CGContextRef object but got an error. My code : UIGraphicsBeginImageContext(imageView.image.size); [imageView.image drawAtPoint:CGPointMake(0, 0)]; context2=UIGraphicsGetCurrentContext(); for(int i=0; i<kmtaObject

How to save a couple of images as one image to photo library in swift?

不问归期 提交于 2019-12-13 20:31:40
问题 There are three imageViews in first view controller (two donuts png and one Simpson image). Are there any solutions that I can capture these images as one image and save it to photo library? Thanks. 回答1: Try this, passing in the base view that has all the subviews you need: func createImage(from aView:UIView) -> UIImage { UIGraphicsBeginImageContextWithOptions(CGSize(width: aView.frame.width, height: aView.frame.height), true, 0) aView.layer.render(in: UIGraphicsGetCurrentContext()!) let

Rotate and translate UIImageView off and on screen

风流意气都作罢 提交于 2019-12-13 20:04:56
问题 How can I rotate and translate a UIImageView off one side of the screen, then its coming back from the other side.. Lets say I have a Wheel that I want to rotate and translate from the middle then off the screen to the left, then its "coming back" from the right side and back the middle.. I used following code to rotate and translate it OFF the screen; CABasicAnimation* rotationAnimation; rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; rotationAnimation

removeFromSuperview UIImageView not working

心已入冬 提交于 2019-12-13 19:40:19
问题 I am trying to remove an image from an existing view using the code below: -(void) deleteImage:(int)imageID{ //[self.imageArray removeObjectAtIndex:imageID]; //remove the image from the screen for (UIView* view in self.view.subviews) { if ([view isKindOfClass:[UIImageView class]] && [view tag] == imageID) { //could be a bug here with the re-Ordering of the array (could add a helper method to reset all the tags on screen when this is called NSLog(@"view %@", view); //[self.imageArray

Swift - Border Inside Masked Image

落爺英雄遲暮 提交于 2019-12-13 19:04:44
问题 I have a masked image that's utilized by a UIBezierPath() and I'd like to have a border around the masked portion rather than the original image. I've come this close in my (countless number) attempt through trial and error and, tirelessly, given up. Any easier way to do this? This is how far I've come to my goal: I'd love to have the border go inward! :-( Swift 2 Code: let picture = UIImageView(image: UIImage(named: "myPicture.png")) picture.layer.contentMode = .ScaleAspectFit picture.layer

Why do all the async image loading (SDWebImage, AFNetworking) libraries use UIImageView instead of UIImage?

做~自己de王妃 提交于 2019-12-13 16:06:07
问题 Am I missing something? Wouldn't allow it to be used with UIImage be more versatile than just UIImageView? You could hand the UIImage around and use it for different things, where a UIImageView can really only be added to the view. My initial thought was what if you hand it to another class and the UIImage hasn't loaded yet, it would receive nil and not be passed anything new. But the same applies if you pass a UIImageView, wouldn't it? 回答1: AFNetworking You're right, the AFNetworking

Get context from UIImageView

夙愿已清 提交于 2019-12-13 14:28:58
问题 Can I get the context ( CGContextRef ) from exists UIImageView ? Detail: I have a controller link to xib file. In IB I have added a UIImageView and reference its on: IBOutlet UIImageView *imageView; Now, in viewDidLoad How get the UIImageView context ( CGContextRef )? Before this, If I use: CGContextRef context = UIGraphicsGetCurrentContext(); output: <Error>: CGContextTranslateCTM: invalid context suggest? 回答1: If you want to use your own drawing methods you should apply them in the drawRect

Collage of images with different shapes

痞子三分冷 提交于 2019-12-13 14:00:52
问题 I am completely new into photo editing app development. How can i develop grid styles like this, so that i can add multiple images picked from cameraroll to create a collage? I went through below links, but not getting the way to achieve this. Any suggestion or links will be helpful. LINK1 LINK2 回答1: You can make custom layout for this or tweak the Flow Layout of Collection View .Check out this code.It has the same functionality you want. You can calculate the width and height of images and

touches event handler for UIImageView

早过忘川 提交于 2019-12-13 12:27:35
问题 I am just getting stated with iPhone development and can't seem to find the answer I am looking for what I want to do. It seems like I should be able to programmatically create a UIImageView and then set up an event handler for it's touch functions. in c# i would have something that looks like Button b = new Button(); b.Click+= my handler code right now I have this CGRect myImageRect = CGRectMake(0.0f, 0.0f, 141.0f, 151.0f); UIImageView *myImage = [[UIImageView alloc] initWithFrame