uiimageview

Take Screenshot of a UIImage iOS

僤鯓⒐⒋嵵緔 提交于 2020-02-29 06:30:07
问题 I want to take screenshot of a perticular section of my screen in a iOS App. The attached image is that part of screen. Here I want to take screenshot of the red marked rectangular area containing 3 UIImageViews which contains a white Image Frame at background , an image with coffee cup and the apple sign image on the coffee respectively. I am using the following code for doing that... - (UIImage *)captureView:(UIView *)view withArea:(CGRect)screenRect { UIGraphicsBeginImageContext(screenRect

Take Screenshot of a UIImage iOS

天大地大妈咪最大 提交于 2020-02-29 06:29:37
问题 I want to take screenshot of a perticular section of my screen in a iOS App. The attached image is that part of screen. Here I want to take screenshot of the red marked rectangular area containing 3 UIImageViews which contains a white Image Frame at background , an image with coffee cup and the apple sign image on the coffee respectively. I am using the following code for doing that... - (UIImage *)captureView:(UIView *)view withArea:(CGRect)screenRect { UIGraphicsBeginImageContext(screenRect

ios UIImage going outside of UIImageView Border

非 Y 不嫁゛ 提交于 2020-02-22 18:47:07
问题 Here black border shows the Parent UIView of UIImageView and Red border showing UIImageView i'm downloading image from server but the image is going outside of the UIImageView area as shown in the image. I'm doing it programmatically any help would be very much appreciated. I'm adding code block below let bottomView : UIView = UIView(frame: CGRect(x : 10, y: stackView.height, width: view.width * 0.75, height: view.width * 0.75 )) view.addSubview(bottomView) bottomView.layer.borderColor =

Show image in ViewController when button is clicked in SecondViewController

笑着哭i 提交于 2020-02-21 07:06:04
问题 How to show an UIIimage by clicking on an UIButton inside another UIViewController ? I would like to add to the same UIButton the command to add an image to the SecondViewController. Excused my poor question. myProtocol.h #import <Foundation/Foundation.h> @protocol myProtocol <NSObject> -(UIImage *)transferImage; @end ViewController.h #import "SecondClass.h" @interface ViewController : UIViewController<myProtocol, UINavigationControllerDelegate>{ UIView *view; } @property (nonatomic,retain)

Show image in ViewController when button is clicked in SecondViewController

偶尔善良 提交于 2020-02-21 07:05:11
问题 How to show an UIIimage by clicking on an UIButton inside another UIViewController ? I would like to add to the same UIButton the command to add an image to the SecondViewController. Excused my poor question. myProtocol.h #import <Foundation/Foundation.h> @protocol myProtocol <NSObject> -(UIImage *)transferImage; @end ViewController.h #import "SecondClass.h" @interface ViewController : UIViewController<myProtocol, UINavigationControllerDelegate>{ UIView *view; } @property (nonatomic,retain)

replace a UIview animation by a timer animation

淺唱寂寞╮ 提交于 2020-02-08 10:19:32
问题 well here is my code : - (CGPoint)randomPointSquare { CGRect frame = [[self view] frame]; //CGFloat rand_x = ((float)arc4random() / (float)UINT_MAX) * (float)_window.frame.size.width; NSInteger side = arc4random() / (UINT_MAX/4); CGFloat offset = 0; switch(side) { case 0: /* top */ offset = ((float)arc4random() / (float)UINT_MAX) * (float)frame.size.width; return CGPointMake(offset, -10); case 1: /* bottom */ offset = ((float)arc4random() / (float)UINT_MAX) * (float)frame.size.width; return

UIImageView for pushing a new ViewController

泄露秘密 提交于 2020-02-07 07:49:47
问题 In my app for a specific reason i want a UIImageView touchable so that when user taps it pushes to a new view controller. I know to do the same with UIButton. But i want a UIImageView to do this now. How will i do it? Here's my code for UIImageView UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(50, 100, 50, 50)]; [imageView setImage:[UIImage imageNamed:@"myImage.png"]]; imageView.userInteractionEnabled = YES; [self.view addSubview:imageView]; [imageView release]; 回答1:

How to load images from JSON into UIImageView using SDWebImage?

ぃ、小莉子 提交于 2020-02-03 01:30:33
问题 I'm trying to display images from a JSON url in an UIImageView, similar to Tinder, using SDWebImage. Every tutorial I've come across only deal with downloading either single image urls (@"suchandsuch.png"), or displaying the images inside of tableviews (which I do not want to do). Not sure what I am doing wrong. My sample code: ViewController.m -(void)viewDidLoad{ [super viewDidLoad]; AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager GET:@"http://www

App running slowly because of UIImageViews

走远了吗. 提交于 2020-01-31 18:28:25
问题 I have three large UIImageViews displaying images within my iPad app (each is almost the size of the screen, and they have special effects such as rotation, shadows , etc to look like a news stack). When these images are displayed, the app runs VERY SLOWLY . UIAlertViews literally look like they have only two frames when they are presented and animations aren't even laggy... they're worse! But when I do not present the UIImageViews, everything works quickly and elegantly. Obviously I'm doing

App running slowly because of UIImageViews

瘦欲@ 提交于 2020-01-31 18:28:08
问题 I have three large UIImageViews displaying images within my iPad app (each is almost the size of the screen, and they have special effects such as rotation, shadows , etc to look like a news stack). When these images are displayed, the app runs VERY SLOWLY . UIAlertViews literally look like they have only two frames when they are presented and animations aren't even laggy... they're worse! But when I do not present the UIImageViews, everything works quickly and elegantly. Obviously I'm doing