uiimageview

Yelp API ios getting a larger image

爷,独闯天下 提交于 2019-12-12 17:03:17
问题 I am currently using the Yelp API for my project, and I need to get the image of a business to use as a background, displayed in a UIImageView. However, all the pictures are too small from the pictures obtained, so the background is blurry. I use this code to obtain the current business images: [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[businessDict objectForKey:@"image_url"]]]]; Is there anyway to obtain a larger image? 回答1: Replace the filename at the end of

Resizable UIImage where outside stretches and inside is kept the same

99封情书 提交于 2019-12-12 16:36:21
问题 I'm trying to create a "grip" for a vertical bar in my app, to show the user that they can swipe on the view. I'd like to just use a small version of the image, which has the grip and 1 px above and below it which is the background for the rest of the bar. So: ssss ssss gggg becomes ssss ssss gggg ssss ssss The method resizableImageWithCapInsets: allows you to tell iOS not adjust the outside edge, but is there a way to tell it to not adjust the interior and stretch with the exterior? I've

Transparent UIImageView in front of all the UI

倾然丶 夕夏残阳落幕 提交于 2019-12-12 16:27:52
问题 After the first launch of my app i want to show the user a little tutorial, to explain the functionality of my app. So i need to set a transpalent UIImageView with some arrow and labels, where the main UI(more specificly,tableviewcontroller in navigationviewcontroller in a tabbarcontroler) is stil visible behind the tutorial image. And,because tutorial consists of several images,I want to add a tap gesture that will switch to another image. I tried just to add an UIImageView to my

SWIFT rotating an image in an UIImageview defined in the Main.storyboard

[亡魂溺海] 提交于 2019-12-12 15:01:31
问题 I'm new to SWIFT and I'm practicing to learn but I'm having some difficulty with something. I have an image in an UIImageview defined at the Main.storyboard that I need to rotate. I have an IBOutlet defined as: @IBOutlet weak var imageToRotate: UIImageView! I was trying to rotate it with the center of rotation on the rightmost side and middle of height and as per the apple documentation and some posts in here I used the anchorPoint: imageToRotate.layer.anchorPoint = CGPointMake( 1.0, 0.5 )

Rotate annotation image on MKMapView

时光总嘲笑我的痴心妄想 提交于 2019-12-12 14:26:21
问题 I am trying to rotate an image that is added to MKMapView as an annotation. This is the code: -(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation: (id<MKAnnotation>)annotation { if (! [annotation isKindOfClass:[IGAMapAnnotation class]]) { //return default view if annotation is NOT of type IGAMapAnnotation... return nil; } MKAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:@"IGAMapAnnotation"]; if (annotationView == nil) { annotationView = [

How to select an UIImgeView from NSArray

◇◆丶佛笑我妖孽 提交于 2019-12-12 14:08:19
问题 I have UIImageView s which are used as drag-able objects and they are in NSArray so and they work fine when drag them but what i want is when i drag them and finish dragging method instead of drop the image in the UIImageView i want replace it with custom image only in the dragged finish. so my problem is if i remove the NSArray and make it only IF statement it work fine but only take one image and if i make it in NSArray as the code below it is take only last image (Close2) and not appended

Loading multiple images in same UIImageView flashes last image before showing new image

梦想与她 提交于 2019-12-12 13:40:23
问题 The goal is to render different images using the same UIImageView. Each time the user taps a different button, a different image gets rendered in the UIImageView. Example user flow: User taps button for image 1. UIImageView appears loaded with image 1. User taps different button to close UIImageView. UIImageView gets hidden. User taps different button for image 2. UIImageView is loaded with image 2 then unhidden. Image 1 appears for a moment before image 2 appears. This works the first time.

iPhone UITabBarController

梦想的初衷 提交于 2019-12-12 12:28:52
问题 I am using a UITabBarController with 3 items and am curious how to access a method from the first tab if I am on the second or third tab. The problem I am running into is I have a UIImageView on the first tab that is using core animation to loop continuously through 3 images. But when I switch to the second tab and try to switch back to the first tab the program hangs. I discovered if I stop the animation then it will let me switch back to the first tab fine. Any ideas? 回答1: You can access

CALayer Positioning After Object Has Moved

六眼飞鱼酱① 提交于 2019-12-12 11:35:18
问题 I animate my UIImageView with CAAnimation using layer property like so: [imageView.layer addAnimation:pathAnimation forKey:[NSString stringWithFormat:@"pathAnimation%@",objId]]; But at the end of my animation (after object has moved from original point) when I read the frame's X Y coordinates or center coordinates they always appear to be original ones, not those where the object has moved to. How to read layer's coordinates so I determine the correct location of my moving object? Here is my

How to add image with text into UIAlertView?

本秂侑毒 提交于 2019-12-12 11:28:04
问题 I want to add image with some text into UIAlertView like given image below Here is my code UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"Please use Settings( ) to configure the phone number and image." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(160.5, 27, 15, 15)]; imageView.image = [UIImage imageNamed:@"settingIcon.png"]; [alert addSubview:imageView]; [alert show]; But image is