Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

iOS: Expanding/contracting a native widget

$
0
0

I have written a custom control to wrap the UIDatePicker control as one entry in a form. The entry is initially contracted and the user can then tap it to expand the date/time picker. The expansion is animated.

This all works but doesn't perform very well on older iPhone models (iPhone 6 or older). I understand the UIDatePicker is quite heavy to render but would it make sense to write some custom view/renderer to contain it and perform the expand/contract animation at the iOS layer, rather than relying on the Xamarin.Forms animation API? Would it make any difference?

If so, can someone give me a hint as to how I control the bounds of a custom renderer? Just setting the bounds and calling the native view's SetNeedsLayout() doesn't affect the layout at all. How is Xamarin Forms layout engine interacting with custom renderers, as those have their bounds changed?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>