sochalewski / uiimageviewalignedswift Goto Github PK
View Code? Open in Web Editor NEWA UIImageView subclass which allows you to align the image left/right/top/bottom, even when contentMode is AspectFit. Swift now.
License: MIT License
A UIImageView subclass which allows you to align the image left/right/top/bottom, even when contentMode is AspectFit. Swift now.
License: MIT License
I use pod install
I got Error when I set ViewControll Class on Storyboard
IB Designables: Failed to render and update auto layout status for XXXXXXXX (iGI-eV-pSd): dlopen(UIImageViewAlignedSwift.framework, 1): no suitable image found. Did find:
UIImageViewAlignedSwift.framework: required code signature missing for 'UIImageViewAlignedSwift.framework'
Hi,
First off thanks much for this library!
iOS13b1 is causing a duplication of the image when using a UIImageViewAligned. If you align the image you'll see the image aligned the way you want, but you'll also see the same image in the center of the view. (both in simulator and device)
If you use UIImageViewAligned and don't align it you'll see a duplication of the image right under the UIImageView it creates.
I've attached a screenshot from Reveal below. Just a simple project with one image.
The bottom layer is referenced as UIImageViewAlignedSwift.UIImageViewAligned, and the top is the UIImageView the library creates.
Thanks again!
The issue is still present in beta version 5 of iOS 13
Please could you add SPM support? Many thanks in advance
I have the same problem!
If the image is aligned, 2 images appear, one aligned and the second in the center of the original. Please pack it as soon as possible!
I have a UIImageViewAlignedSwift
in a table cell. When I present a UIAlertController
, the underlying image show up and overlapping with the aligned image.
Device: iPhone 6s Plus
iOS Version: 13.5.1
when I try to add user defined attribute I get this error:
Failed to set (alignBottom) user defined inspected property on (UIImageViewAlignedSwift.UIImageViewAligned): [<UIImageViewAlignedSwift.UIImageViewAligned 0x7fe046480f00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key alignBottom.
Time to merge the Swift 3 branch! Is it ready?
Would it be possible for you to do a release with the new Carthage support? I'd love to tag against that release instead of master
for our release.
Hi , I am new to swift.
I looking for the image can align top when the image view is set to Aspect Fill in storyboard inside the tableview.
so how i call the align top function for this pod?
Will there be Swift 2.3 support?
I set up an image with aspect fill, clip to bounds and align left = on. When I see it in storyboard everything looks fine but when run the project, images disappear.
i added in my pod file the following:
pod 'UIImageViewAlignedSwift', '~> 0.1'
but pod install installs version 0.3.1 which causes build failures as this version requires the newer swift versions.
Can you please check this?
Thank you very much
Hi, I'm a little new on the subject of iOS and not quite understand some things. It happens the following:
The problem is that when I run the app the compiler tells me that there is no such property. can someone please help me?
Hello there, I was porting this code to Xamarin.iOS I was wondering why is the iOS 11 specific code needed.
Can you elaborate please?
I've tried to integrate your UIImageViewAlignedSwift
class as follows, but unfortunately the UIImage itself is not rendered at all (see attached screenshot). What's wrong?
let imageView = UIImageViewAligned(image: UIImage(named:"my-image"))
imageView.contentMode = .scaleAspectFit
imageView.scaling = .down
imageView.alignment = .bottomRight
imageView.backgroundColor = .red
imageView.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(self.rightImageView)
let imageViews = ["imageView":imageView]
self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:[imageView(32)]-6-|", options: [], metrics: nil, views: imageViews))
self.view.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:[imageView(32)]-6-|", options: [], metrics: nil, views: imageViews))
And here is the result (the red box in the bottom right corner):
EDIT
It was not setting the image programmatically that causes the issue, but dismissing a UIViewController above the one with the image after presenting it as a popover i.e..
Below the original post.
I have set UIImageViewAligned
as my UIImageView
's class in storyboard, enabled right alignment and provided an image:
It works just like it should until I update the image programmatically like:
imageView.image = UIImage(named: "account.png")!
This results in the following UI:
Any idea why this happens & what I can do about it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.