Closed Nosskirneh closed 4 years ago
I don’t believe this is possible without restructuring how %init
is implemented. It would involve us splitting out the generated code you’re seeing there into its own inline
function. That may be worth it anyway though, not just for this specific edge case but just to make the generated code slightly cleaner?
I see. I wished I could help more, but I've never touched Perl.
This is somewhat related to item 2 of #5.
Can you try doing this in the mean time?
%c(SBHomeScreenBackdropView) ? (%init(SwitcherBackdrop_iOS12)) : (%init(SwitcherBackdrop_iOS11));
@uroboro Yes, that works fine, thank you!
While it does indeed work, I don’t believe this is a good application of the ternary operator. I won’t be adding any specific support for this usage.
It would make sense to write the snippet
as a ternary statement,
but that results in errors.
It seems like Logos outputs a mix between a normal if statement and a ternary operator.