SizeGuideView (Views)
The same button as an Android View: set client and product.
Parameters
Section titled “Parameters”contextContextRequiredattrsAttributeSet?Optional= nulldefStyleAttrIntOptional= 0Properties
Section titled “Properties”clientTryYourSize?RequiredYour client.
productString?RequiredYour product ID or SKU.
variantSizeGuideVariantRequiredLINK (default) or BUTTON.
labelString?RequiredYour own words instead of "Size guide".
onRecommendation((Recommendation) -> Unit)?RequiredThe shopper's recommended size, on show and on every change.
Example
Section titled “Example”// Viewsval guide = SizeGuideView(context).apply { client = tys product = "SKU-123" variant = SizeGuideVariant.BUTTON onRecommendation = { rec -> /* … */ }}// UIKitlet guide = SizeGuideButton(client: tys, product: "SKU-123", variant: .button)guide.onRecommendation = { rec in /* … */ }stack.addArrangedSubview(guide)Was this page helpful?
Thank you. We read every answer.