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:
  1. Drag and drop an UIImageView component to Interface Builder canvas.
  2. Switch class name from UIImageView to FUIImageView', and set module toSAPFiori`.
  3. To apply, set @IBInspectable property isCircular, to true
  • 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