Overview
TheMetaMapUIConfig class provides UI configuration options for customizing the visual appearance of the MetaMap SDK. While this class exists in the SDK framework, its properties are configured through the metadata dictionary passed to the showMetaMapFlow method.
As of SDK version 3.22.8, UI configuration is handled through the metadata dictionary rather than direct class instantiation. See the examples below for proper usage.
Class Definition
Objective-C
Configuration Options
UI customization is achieved through the following metadata keys:Color Configuration
Sets the background color of the main action button using hexadecimal color format.
Sets the text color of the main action button using hexadecimal color format.
Font Configuration
Specifies the filename of a custom regular weight font. The font file must be included in your app’s bundle.
Font files must be properly registered in your app’s Info.plist under the
UIAppFonts key.Specifies the filename of a custom bold weight font. The font file must be included in your app’s bundle.
Language Configuration
Sets the UI language. Supported values:
"en", "es", "fr", "pt", "ru", "tr", "de", "it", "pl", "th".Usage Examples
Basic UI Customization
Custom Fonts and Colors
Adding Custom Fonts to Your Project
To use custom fonts with the MetaMap SDK:- Add your font files (.ttf or .otf) to your Xcode project
- Ensure the fonts are included in your app target
- Add the font filenames to your Info.plist:
Info.plist
- Reference the font files in your metadata configuration
Complete Configuration Example
Best Practices
Color Selection
Use high contrast color combinations for better accessibility. Ensure text is readable against button backgrounds.
Font Compatibility
Test custom fonts across different screen sizes and iOS versions. Provide fallback options if custom fonts fail to load.
Language Support
Set
fixedLanguage based on user preferences or device locale to provide the best user experience.Consistent Branding
Match the MetaMap UI colors and fonts to your app’s design system for a seamless user experience.
Notes
- Invalid hexadecimal color values will fallback to defaults
- If custom fonts are not found, the SDK uses system fonts
- All UI configuration keys are optional
- Configuration is applied per verification flow session
See Also
- MetaMapMetadata - Complete metadata configuration reference
- MetaMap - Main SDK class
- MetaMapButton - Pre-built verification button