Page Properties | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
This page shows how you can customize the user experience and adapt the user interface to suit your preferences.
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
Colors
We are providing provide a global color palette GiniColors.xcassets
which you are free to override.
We offer several methods for overriding colors:
Using your main bundle. To override
...
a color such as
Accent01
color, simply create anAccent01.colorset
with your wished value in your main bundle.Using a custom bundle. Set
customResourceBundle
inGiniBankConfiguration
to use a custom bundle. Then, create anAccent01.colorset
file with your desired value in the custom bundle to override theAccent01
color.Using
customResourceProvider
. This method enables the customization of resources to override the default Gini colors, impacting all screens. To implement this, setcustomResourceProvider
inGiniBankConfiguration
.
Info |
---|
To ensure proper customization, set |
Find the names of the color resources in the color palette (you can also view it in Figma here):
Figma for confluence lite | ||||
---|---|---|---|---|
|
...
Images
Images customization Customizing of images is done via overriding of GiniImages.xcassets resourcesdrawable resources.
If you want to override specific SDK images:
Create an asset catalog for images called
GiniImages.xcassets
in your app.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 | ||||
---|---|---|---|---|
|
To override them in your application please , use GiniBankConfiguration.updateFont(_ font: UIFont, for textStyle: UIFont.TextStyle)
. For , for example:
Code Block | ||
---|---|---|
| ||
// 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.
Custom UI elements
Certain elements of the UI can be fully customized via UI injection. It utilizes view adapter interfaces which you can implement and pass to GiniBank
when configuring the SDK. These interfaces declare the contract the injected view has to fulfill and allow the SDK to ask for your view instance when needed.
Top navigation bar
Colors, typography, and texts can be customized as described above.
To inject your own navigation bar view, you need to pass your navigation view controller to GiniBankConfiguration.shared.customNavigationController
. The view from the custom navigation view controller will then be displayed on all screens as the top navigation bar.
Bottom navigation bar
You can opt to show a bottom navigation bar. To enable it, pass true
to GiniBankConfiguration.shared.bottomNavigationBarEnabled
.
The top navigation bar will still be used, but its functionality will be limited to showing the screen’s title and an optional close button. Please inject a custom top navigation bar if your design requires it even if you have enabled the bottom navigation bar.
For each screen, we provide the possibility to inject a custom bottom navigation bar. More details will be added below during the specific screen customization.