Git Product home page Git Product logo

Comments (5)

marbetschar avatar marbetschar commented on September 26, 2024

Any idea why it's not working as expected? Or am I doing something wrong?

from uiimageviewalignedswift.

marbetschar avatar marbetschar commented on September 26, 2024

just noticed it seems to work if I set the image after initialization of the imageView as follows:

imageView.image = UIImage(named: "my-image")

Seems like a bug.

from uiimageviewalignedswift.

marbetschar avatar marbetschar commented on September 26, 2024

For some reason this library does not compile for an archived app version when checked out via Carthage. FWIW: I've subclassed your as follows - this refuses to compile for the app store:

import UIKit
import UIImageViewAlignedSwift

class ChartImageView: UIImageViewAligned{
	
	var imageMaskingColorComponents: [CGFloat]?
	var imageTintColor: UIColor?
	
	override var image: UIImage?{
		get{
			return super.image
		}
		set{
			var newImage = newValue
			
			if let color = self.imageTintColor{
				newImage = newImage?.applied(tintColor: color)
			} else if let colorComponents = self.imageMaskingColorComponents{
				newImage = newImage?.masked(withColorComponents: colorComponents)
			}
			
			super.image = newImage
		}
	}
}

from uiimageviewalignedswift.

piotrros avatar piotrros commented on September 26, 2024

I've just stepped into the same problem. Thanks for the hint. Seems like a bug.

from uiimageviewalignedswift.

sochalewski avatar sochalewski commented on September 26, 2024

@marbetschar @piotrros It's fixed since 0.4.0. In addition scaling is not available, as long as it doesn't work as desired.
Not sure about Carthage, because I don't use it and my knowledge about this is really poor. Please PR if you know how to fix this 👍

from uiimageviewalignedswift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.