uiimageview

Storyboard, UIImageView. Load image from bundle

我与影子孤独终老i 提交于 2019-12-07 20:48:43
问题 My issue is: I have several projects/targets with shared xcassets. What I want to do is to set images inside storyboard without code. As I was able to find, there are no way to set image in storyboard from different bundle. I created UIImageView extension, but don't think about like the best solution. Is there exist a way to use assets in storyboard from different bundle? Thanks. 回答1: So, based on answers to this question, I do know of one solution. Sounds like you've already done some of

Adding Pinch/Zoom effect to a UIImageView inside a UIScrollView

﹥>﹥吖頭↗ 提交于 2019-12-07 17:33:48
问题 I have a very basic screen sharing iPhone app, I have successfully added the pinch/zoom effect to my app using a UIImageView inside a UIScrollView . The UIImageView receives the screen content from the PC on a regular interval. Everything works fine but as soon as I scroll/pinch/zoom it works at first but then it stops, and the delegate method that's updating the image view content stops firing up even though the server still sends the screen content. The whole app seems to be frozen but

How I can round UIImageView in UICollectionViewCell?

爷,独闯天下 提交于 2019-12-07 17:24:46
问题 In my UICollectionViewCell class I wrote this: - (void)layoutSubviews { [super layoutSubviews]; self.myImageView.layer.cornerRadius = CGRectGetHeight(self.myImageView.frame) / 2; self.myImageView.layer.masksToBounds = YES; } But this does not work correctly in all cases, it appears like this: 回答1: I faced a similar problem trying to get a collectionView inside a TableView Cell. If you are changing your cell's model you should tell the cell to recalculate its layout so the cell changes its

write text on image view image

半城伤御伤魂 提交于 2019-12-07 17:07:04
问题 Currently, I am developing an App in which I have a Image view on which image are constantly changes after some time. Now I want that I am able to write some text or draw any symbol ,simple line,cross line means to say drawing on image appears in image view. Means I want to add text or drawing some symbols or lines e.t.c on image. I am searching everywhere but can't find any solution. How can I solve this? Thanks in advance. 回答1: See if this works : //Add text to UIImage -(UIImage *)addText:

Custom UIButton cant interact with linked UIImageView

蹲街弑〆低调 提交于 2019-12-07 15:52:14
问题 I'm stuck on the following code. Some how my UIButton Extended class cant show or hide an UIImageView My methods are being called and the imageview is not nil. Here is the code: @interface UILinkedImageButton : UIButton { IBOutlet UIImageView *linkImageView; } @property (nonatomic, retain) IBOutlet UIImageView *linkImageView; @end #import "UILinkedImageButton.h" @interface UILinkedImageButton () - (void)showImage; - (void)hideImage; @end -------------------------------------------------------

repeat an image when scrolling on iphone

…衆ロ難τιáo~ 提交于 2019-12-07 15:27:48
问题 i've got an UIImageView, now i want to repeat this image, that it always shows up again when scrolling left or right. Little Example: is this possible? it should feel like an infinite loop 回答1: The word "infinite" rules out a UISCrollView or a CATiledLayer , obviously. I'd say the easiest way to achieve this is to initialize enough UIImageView s to completely fill your screen (or scroll area), plus one, and implement your own dragging/scrolling system and recycle the UIImageView s as they go

how to display images horizontal UIscrollView Programmatically

落爺英雄遲暮 提交于 2019-12-07 15:11:29
问题 I did Get images for Url.and then display on SCrollView.My code like this NSMutableArray *al=[NSJSONSerialization JSONObjectWithData:webData options:0 error:nil]; for (NSDictionary *diction in al) { NSString *geting =[diction valueForKey:@"dealimage"]; NSLog(@"dealimage is %@",geting); NSData *getdata=[[NSData alloc]initWithData:[NSData dataFromBase64String:geting]]; NSLog(@"good day %@",getdata); dataimages=[UIImage imageWithData:getdata]; NSLog(@"dataimages %@",dataimages); [imagesarray

UIButtons over a UIImageView Zooming

这一生的挚爱 提交于 2019-12-07 14:37:10
问题 hey guys, this is my first time post here, and im pretty new to iphone programming. i just started about a month ago and have only been tinkering with small tutorial type applications but anyways, heres my question i currently have a UIScrollView thats scrollable and zoomable, that loads a UIImageView subview, and i want to add in some controls(UIButtons) over the image view but when i zoom in and out the whole group(the buttons and the image) zoom togeather. if i add the UIButtons to my

UIImageview programmilly manage for iphone5 and iphone4

Deadly 提交于 2019-12-07 14:32:25
问题 I have an Issue about UIImageView Manage by XIB file for iphone5 screen Height and Iphone4 Screen Height. I Try to Manage code for UIImageView like this ~ CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height; if ([UIScreen mainScreen].scale == 2.f && screenHeight == 568.0f) { backgroundImage.autoresizingMask=UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth; frameView.autoresizingMask=UIViewAutoresizingFlexibleHeight; backgroundImage.image = [UIImage imageNamed:@"bg

Is there any reason why we don't use subclasses of UIImageView?

為{幸葍}努か 提交于 2019-12-07 13:25:35
问题 I'm currently trying to create a subclass of UIImageView in order to make it download its image from server asynchronously ;) I tried to do it by myself but I haven't gone very far yet :D Anyway, I looked around here and found this : AsyncImageDownload I had a look at the code and the first which springs to mind is : why subclassing a UIView and not a UIImageView ?!? Any thoughts ? Cheers mates, Gotye. 回答1: The reason it is subclassing UIView is so that you should, for example, display a