FUIImageView
open class FUIImageView: UIImageView, FUIObservableValue
FUIImageView
is an enhanced Fiori style UIImageView
that provides the option of applying a circular mask to the view’s image
property. The view also exposes properties for specifying the width and color of an optional border around the image.
Remark
Implements@IBDesignable
Usage
- Initializing programmatically:
let imageView = FUIImageView(image: UIImage(named: "myProfilePic"))
//set image view to be circular
imageView.isCircular = true
- Placing inside a Storyboard or xib:
- Drag and drop an
UIImageView
component to Interface Builder canvas. - Switch class name from
UIImageView
toFUIImageView', and set module to
SAPFiori`. - To apply, set
@IBInspectable
propertyisCircular
, totrue
-
Implementation of change handler. Is invoked on changes to the
value
property.Declaration
Swift
open var onChangeHandler: ((Optional<UIImage>) -> Void)?
-
Property defining the circular type of the image view. Default is false, which has no ciruclar mask to the image
Declaration
Swift
open var isCircular: Bool = false
-
Property defining the border color.
Declaration
Swift
open var borderColor: UIColor?
-
Property defining the border width. A width of 0.0 will result in no border being shown.
Declaration
Swift
open var borderWidth: CGFloat