[iOS][Rendering] Container additional properties aren't exposed to the custom renderer
See original GitHub issuePlatform
What platform is your issue or question related to? (Delete other platforms).
- iOS
Author or host
Host
Version of SDK
2.4.6
Details
Similar to #5273, additional properties set on a Container element aren’t available in the ACRBaseCardElementRenderer
custom renderer subclass.
acrRegistration.setBaseCardElementRenderer(CustomContainerRenderer(), cardElementType: .container)
class CustomContainerRenderer: ACRBaseCardElementRenderer {
override func render(
_ viewGroup: (UIView & ACRIContentHoldingView)!,
rootView: ACRView!,
inputs: NSMutableArray!,
baseCardElement acoElem: ACOBaseCardElement!,
hostConfig acoConfig: ACOHostConfig!) -> UIView! {
let view = ACRContainerRenderer.getInstance()?.render(
viewGroup,
rootView: rootView,
inputs: inputs,
baseCardElement: acoElem,
hostConfig: acoConfig)
// this is always empty!
if let props = acoElem.additionalProperties {
if let cornerRadius = props["my.cornerRadius"] as? CGFloat {
view?.layer.cornerRadius = cornerRadius
}
}
return view
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Unity 2023.2.0b5
Graphics Device Features: Rendering artifacts using Custom Render Texture shader on Sphere Game Object (UUM-43540).
Read more >ag-Grid Cell Rendering - Custom Props
After looking through the ag-Grid Cell Rendering documentation I don't see a way to add custom properties to the cell renderer via the ......
Read more >Feature Levels and Rendering Modes
Guide to the Mobile Renderer's modes and feature levels.
Read more >React Data Grid: Cell Renderer
The example below shows a simple Cell Renderer in action. ... Sometimes the data property in the parameters given to a cell renderer...
Read more >Untitled
Question - Custom shaders make mesh invisible in URP … Unity - Manual: Mesh Filter component WebApr 7, 2023 · Property: Function: Render...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK yes, that works. Thanks for the info!
@jscalo I tested this use case. Unfortunately, I wasn’t able to reproduce the issue. Here is my test card & custom renderer
Test Code Snippet of Custom Container Renderer
Swift example
I realized that we need documentation on additional properties for Swift and need additional context. I will update the doc. Meanwhile, additional properties is an NSData, and it has to be deserialized to a dictionary, then it can be queried. I will update the documentation. let me know if you still see this issue. Closing this issue and https://github.com/microsoft/AdaptiveCards/issues/5273. Feel free to re-open it if your issue is not resolved.