Supporting Types

FUIImageView

FUIImageView is an enhanced UIImageView that applies a circular mask to the image property when isCircular property is true. Additionally the view defines properties to specify the width and color of an optional border around the image. The view is also designable in Interface Builder - simply drop a UIImage view onto your xib or storyboard and change the implementation class to FUIImageView and the module to SAPFiori.

Usage

  • Programmatically initializing it:

    let imageView = FUIImageView(image: UIImage(named: "myProfilePic"))
    //set image view to be circular
    imageView.isCircular = true

  • Placing it inside a storyboard or xib:
  • Drag and drop an UIImageView component to InterfaceInspector, rename UIImageView to FUIImageView for the class name and set module to SAPFiori
  • For a circular image view, set inspected property, Is Circular, to On

FUIBannerMessageView

FUIBannerMessageView is a UIView which contains a message showing underneath the navigation bar.

Always use the instance property bannerView of a FUINavigationBar instead of creating a new FUIBannerMessageView instance yourself.

Image

Usage

Call show(message:withDuration:animated:) method on a bannerView property of FUINavigationBar to show the message. By default, the message is shown centered on screen for two seconds.

 guard let navBar = self.navigationController?.navigationBar as? FUINavigationBar else {
    return
 }
 navBar.bannerView?.show(message: "This is a test banner", withDuration: 1, animated: true)

FUINavigationBar

FUINavigationBar is a subclass of ‘UINavigationBar’ which adopts fiori style and contains a FUIBannerMessageView property by default.

Call show() on a FUIBannerMessageView instance to show the message. By default, the message is shown centered on screen for two seconds.

Image

Usage

Setup

Setup a FUINavigationBar in your navigation controller. You can set either in storyboard or programatically.

Show banner message if needed.

guard let navBar = self.navigationController?.navigationBar as? FUINavigationBar else {
return
}
navBar.bannerView?.show(message: "This is a test banner", withDuration: 1, animated: true)
  • Subclass of UILabel, implementing onChangeHandler that is invoked on changes to the value property.

    See more

    Declaration

    Swift

    open class FUILabel: UILabel
  • 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
    See more

    Declaration

    Swift

    open class FUIImageView: UIImageView, FUIObservableValue
  • Subclass of UITextField, which implements the FUIObservableValue protocol, to observe changes to the text property. The onChangeHandler: ((String?) -> Void)? closure will be invoked on changes to the text property.

    See more

    Declaration

    Swift

    open class FUITextField: UITextField, FUIObservableValue
  • FUINavigationBar is a subclass of ‘UINavigationBar’ which applies the Fiori Design Language styling by default.

    It exposes a bannerView: FUIBannerMessageView view property, which may be presented, using the FUIBannerMessageView show() method. By default, the message is shown centered on screen for two seconds.

    Usage

    Configuration

    Setup a FUINavigationBar in your navigation controller. You can set either in storyboard or programmatically.

    Presenting FUIBannerMessageView

    guard let navBar = self.navigationController?.navigationBar as? FUINavigationBar else {
       return
    }

    navBar.bannerView?.show(message: This is a test banner, withDuration: 1, animated: true)

    See more

    Declaration

    Swift

    open class FUINavigationBar: UINavigationBar
  • Subclass of UIButton, which fixes the issue in UIButton where setting the titleLabel.text property does not update the label text value.

    Declaration

    Swift

    open class FUIButton: UIButton
  • FUITag is an enhanced FUILabel that applies Fiori Design tag color schemes to the label by default.

    Usage

    • Initializing programmatically:
    
    let tag = FUITag(title: "Tag1")
    
    
    • Placing inside a Storyboard or xib:
    1. Drag and drop an UILabel component to Interface Builder canvas.
    2. Switch class name from UILabel to FUITag, and set module to SAPFiori.
    See more

    Declaration

    Swift

    open class FUITag : FUILabel
  • A protocol defines properties that a view supporting validation should have.

    See more

    Declaration

    Swift

    public protocol FUIInlineValidation
  • Simple enumeration for horizontal alignment styles

    • left: left-aligned
    • center: center-aligned
    • right: right-aligned
    See more

    Declaration

    Swift

    public enum FUIHorizontalAlignment
  • An struct that represents style classes

    See more

    Declaration

    Swift

    public struct FioriStyle