uiimageview

landscape mode images in a full screen UIImageView

a 夏天 提交于 2019-12-23 03:38:19
问题 Is it possible to let the UIImageView handle landscape images differently from portrait images? I'll try to explain, I have ImageViewController with a UIImageView that fill the entire screen. In some point the user launch a UIImagePickerController and choose a picture from the camera roll. Then I create an instance of the ImageViewController with that picture and push it - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {

UIImageView animation starts a few seconds after startAnimating is issued

[亡魂溺海] 提交于 2019-12-23 02:59:09
问题 Ok, I have the following very simple animation composed of 25 frames in PNG format. Each frame is 320 × 360 and about 170Kb in size. Here is the code I use .h: IBOutlet UIImageView *Animation_Normal_View; In Interface Builder I have a UIImageView with a referencing outlet pointing to this. All my images are named normal_000_crop.png, normal_001_crop.png, normal_002_crop.png,... .m: Animation_Normal = [[NSMutableArray alloc] initWithCapacity:25]; for (int i = 0; i < 25; i++) { [Animation

objective c subclass UIImageView

吃可爱长大的小学妹 提交于 2019-12-23 02:54:18
问题 I'm trying to subclass UIImageView to add some custom functionality in it. I started trying to do the basics, just init an object with a given image and display it on the screen. Using UIImageView everything works fine, but if i change my object from UIImageView to my custom class, no image is displayed. Here's what i've done so far: //Imager.h #import <UIKit/UIKit.h> @interface Imager : UIImageView { } -(id) init; -(void) retrieveImageFromUrl: (NSString *)the_URL; @end //Imager.m #import

Retina images (@2x~ipad) not loaded if iPad image doesn't exist (~ipad)

余生长醉 提交于 2019-12-23 01:40:08
问题 I have something strange in my app. If in the ressources I have 2 files named : myFile~ipad.png and myFile@2x~ipad.png the retina image is loaded on iPad retina as it should be. But If i have two files named myFile.png and myFile@2x~ipad.png , the retina images is never loaded and myFiles.png is used for all devices. Is this normal ? The problem is that I want to use the image myFile.png for iPhone, iPhone retina and iPad and the image myFile@2x~ipad.png for iPad retina so I can't put the

How do I display an image from Parse in a UIImageView (Swift)?

孤者浪人 提交于 2019-12-23 01:25:48
问题 I am fairly new to both Swift and Parse, and I am trying to display an image I have uploaded to Parse (through Parse, not through my app) in my app as a UIImageView. The idea is that I will be able to change the image via Parse if I want and display it in the same single UIImageView in the app -- literally just need the code to retrieve an image in Parse to UIImageView. I have searched for ages for an answer to this but have not found one, even though it seems like it should be so easy; maybe

jquery slide down image on page load

情到浓时终转凉″ 提交于 2019-12-23 01:19:20
问题 I'm not experienced with jquery (or java script really), but trying to make an image ( img id=mike ...) slide in when a page loads. After looking through the jquery docs and trying Google queries, I have so far come up with this $(document).ready(function() { $("#mike").load(function () { $(this).show("slide", { direction: "up" }, 2000); }); }); And applied the CSS display:hidden so it remains hidden until I want it to slide in on page load. This doesn't seem to work unless I reload the page

UIImageView Resizing / Scaling - SWIFT

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 18:35:32
问题 I have a UIImageView that's size(width = screensize, height = 239). I now download an image that is size(width = 1366 and height = 445). I can't use Aspect Fit (because of white background) or Scale (screws up the aspect ratio). I do want to use Aspect Fill and align it in a specific way - i.e. aspect fill on right aligned or aspect fill on left aligned. Does anyone know how to do this? I've used different libraries like Toucan but I can't seem to get it to work. Thanks a bunch SO. 回答1: You

Transparent Circle at Middle of UIImageView IOS

社会主义新天地 提交于 2019-12-22 18:18:22
问题 I need to make UIImageView transparent at the Middle Position(Round Circle ..See attached image) I should be able to see the Behind Subviews of UIImageView via that middle circle...i tried CAShapeLayer..but i am not able to see the behind subviews of UIImageView..Please help me..Sorry for my English.... CAShapeLayer *circleLayer = [CAShapeLayer layer]; // Give the layer the same bounds as your image view [circleLayer setBounds:CGRectMake(100.0f, 100.0f, [((UIImageView *)view) bounds].size

Screen shot not provide image of whole screen

[亡魂溺海] 提交于 2019-12-22 12:23:56
问题 I am making application related to images. I have multiple images on my screen. I had take screen shot of that. But it should not provide my whole screen. Little part of the top most & bottom most part need not be shown in that. I have navigation bar on top. And some buttons at bottom. I don't want to capture that buttons and navigation bar in my screenshot image. Below is my code for screen shot. -(UIImage *) screenshot { UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, YES,

viewDidLayoutSubviews called after touchesBegan - again and again

耗尽温柔 提交于 2019-12-22 11:24:57
问题 In an iPhone word game I have an UIScrollView (holding UIImageView ) and 7 draggable custom UIView s placed initially at the bottom (and outside the scroll view): In the single ViewController.m I have overwritten viewDidLayoutSubviews so that it always sets the zoomScale of the scroll view - to have the UIImageView fill exactly 100% of the screen width. This works well - for portrait and landscape modes. And when the app is just started: My problem is however, when I first pinch/zoom/double