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

iOS UILabel Autoshink is not working.

$
0
0

Hi, My requirement is to display ios UILabel text single line, if text size is large decrease font size of label. How to achieve in forms. If not in form how to do in CustomLabelRenderer. I used below properties in CustomLabelRenderer in iOS but its not working. Please do need helpful.

iOS Renderer Code:

protected override void OnElementChanged (ElementChangedEventArgs<Xamarin.Forms.Label> e)
            {
                base.OnElementChanged (e);
                AutoShinkLabel el = Element as AutoShinkLabel;
                var labelTextField = (UILabel)Control;
                labelTextField.AudjustsFontSizeToFitWidth = true;
                labelTextField.MinimumScaleFactor = 0.6f;
            }

Viewing all articles
Browse latest Browse all 58056

Trending Articles



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