Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page Properties
hiddentrue

Status

Status
colourGreen
titleapproved

Approver

Nadzeya Karaban

This page shows how you can customize the user experience and adapt the user interface to suit your preferences.

Table of Contents
minLevel1
maxLevel6
outlinefalse
typelist
printablefalse

...

We provide a global color palette GiniColors.xcassets which you are free to override. Custom colors are applied to all screens. You can find the names of the colors in GiniColors.xcassets.You can view our color palette here

We offer several methods for overriding colors:

  1. Using your main bundle. To override a color such as Accent01 color, simply create an Accent01.colorset with your wished value in your main bundle.

  2. Using a custom bundle. Set customResourceBundle in GiniBankConfiguration to use a custom bundle. Then, create an Accent01.colorset file with your desired value in the custom bundle to override the Accent01 color.

  3. Using customResourceProvider. This method enables the customization of resources to override the default Gini colors, impacting all screens. To implement this, set customResourceProvider in GiniBankConfiguration.

Info

To ensure proper customization, set customResourceProvider before configuring any custom Gini button configurations, such as primaryButtonConfiguration, secondaryButtonConfiguration, transparentButtonConfiguration, cameraControlButtonConfiguration, and addPageButtonConfiguration.

Find the names of the color resources in the color palette (you can also view it in Figma here):

Figma for confluence lite
nodeUrlhttps://www.figma.com/file/w6VLDKCkunlgBRQcydqJGo?type=design&design/wFFQijBGQpquaMdWdZlKEj/iOS-Gini-Bank-SDK-3.12-UI-Customisation?node-id=14:355-355&node-type=frame&t=YNRT1Uu0D013tdiW-0
height1000px

...

Images

Images customization Customizing of images is done via overriding of GiniImages.xcassets resourcesdrawable resources.

If you want to override specific SDK images:

  1. Create an asset catalog for images called GiniImages.xcassets in your app.

  2. Add your own images to GiniImages.xcassets using the image names from the SDK's UI customization guide. It is important to name the images you wish to override exactly as shown in the UI customization guide, otherwise overriding won’t work.

...

Typography

We provide global typography based on text appearance styles from UIFont.TextStyle.

Preview our typography and find the names of the style resources (you can also view it in Figma here):

Figma for confluence lite
nodeUrlhttps://www.figma.com/filedesign/w6VLDKCkunlgBRQcydqJGowFFQijBGQpquaMdWdZlKEj/iOS-Gini-Bank-SDK-3.1.012-UI-Customisation?type=design&node-id=2574-12863&modenode-type=designframe&t=eBZWmnwNW3tSyZW8YNRT1Uu0D013tdiW-0
height1000px

To override them in your application, use GiniBankConfiguration.updateFont(_ font: UIFont, for textStyle: UIFont.TextStyle), for example:

Code Block
languageswift
    // If you need to scale your font, please use our method `scaledFont()`. Please, find the example below.
    let configuration = GiniBankConfiguration.shared
    let customFontToBeScaled = UIFont.scaledFont(UIFont(name: "Avenir", size: 20) ?? UIFont.systemFont(ofSize: 7, weight: .regular), textStyle: .caption1)
    configuration.updateFont(customFontToBeScaled, for: .caption1)

    // If you would like to pass us already scaled font.
    let customScaledFont = UIFontMetrics(forTextStyle: .caption2).scaledFont(for: UIFont.systemFont(ofSize: 28))
    configuration.updateFont(customScaledFont, for: .caption2)

...

Text customization is done via overriding of string resources. If you plan to use a custom name for localizable strings, you need to set it in GiniBankConfiguration.localizedStringsTableName.You can find all the string resources in Localizable.strings.