Game Zone UI Customization for iOS
After you build the Gamification Mobile SDK for iOS, you can customize the game zone UI components.
The game zone UI components are available in the LoyaltyMobileSDK-iOS/SampleApps/MyNTORewards/MyNTORewards/GameZone package.
Customize the spinner components, such as the wheel size, frame width and color, wheel segments, spin button, and more in the FortuneWheelView.swift file. Here are all the parameters you can modify.
For example, to change the spin wheel outer frame width and height, open the LoyaltyMobileSDK-iOS/SampleApps/MyNTORewards/MyNTORewards/GameZone/Views/FortuneWheel/FortuneWheelView.swift file in Xcode, and replace Circle() frame(width: 316, height: 316) with Circle() frame(width: 300, height: 300).
To change the spin button background color to blue, open the LoyaltyMobileSDK-iOS/SampleApps/MyNTORewards/MyNTORewards/Misc/Color.swift file, and inside the ColorTheme structure, replace let wheelIndicatorBackground = Color("wheelIndicatorBackgroundColor") // #23475F with let wheelIndicatorBackground = Color.blue.
You can customize the scratch card components, such as the box, canvas, wrapper text, and more in the ScratchCanvasView.kt file. Here are all the properties you can customize:
For example, to change the angle of the scratch card wrapper text inside the gray box, open the LoyaltyMobileSDK-iOS/SampleApps/MyNTORewards/MyNTORewards/GameZone/Views/ScrachCard/ScratchCardView.swift file in Xcode, and replace rotationEffect(Angle(degrees: -45)) with rotationEffect(Angle(degrees: -25)) . To change the number of times the text appears inside the gray box, replace Text(String(repeating: (StringConstants.Gamification.scratchCardLabel), count: 70)) with Text(String(repeating: (StringConstants.Gamification.scratchCardLabel), count: 50)) .