Hi Patrik,
Regarding TimePicker query:
We have checked query with time picker editor value only considered as UTC value while selecting from UITimePicker in Xamarin.Forms.iOS platform, since the default value of UITimePicker Date property returns with UTC value.
We are able to reproduce the mentioned issue and we have logged on issue report to consider the time picker value considered with local time zone. we wil include this issue fix in our upcoming Volume 2 SP2 release. We appreciate your patience until then.
Regarding PlaceHolder text in Multiline text
We have analyzed your query for place holder text in Multiline text editor. In
UITextView, there is no direct API for
PlaceHolderText in the Framework for iOS platform. So PlaceHolderText will not work in inbuilt (
MultiLineText) dataform editor in DataForm. PlaceHolderText API is available only in
UITextField.
However, through registering custom view in custom editor your requirement can be achieved in sample level. You can refer our online user guide documentation for creating new custom editor in DataForm.
We have created a sample for multiline text editor, created a custom renderer inherited from ViewRenderer.
Note: In ViewRenderer, Custom UITextView with PlaceHolderText customization is returned.
Code snippet :
|
[assembly: ExportRenderer(typeof(CustomEntryEditor), typeof(CustomEntryRenderer))] namespace GettingStarted.iOS { class CustomEntryRenderer : ViewRenderer { private CustomEntryEditor FormsEntry { get; set; }
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.View> e) { base.OnElementChanged(e); if (e.NewElement != null) { FormsEntry = (e.NewElement as CustomEntryEditor); CustomNativeView textView = new CustomNativeView() { Text = FormsEntry.PlaceHolderText, Placeholder = FormsEntry.PlaceHolderText, TextColor = UIColor.Gray}; this.SetNativeControl(textView); } } }
public class CustomNativeView : UITextView { public string Placeholder { get; set; } public CustomNativeView() { ShouldBeginEditing = t => { if (Text == Placeholder) { Text = string.Empty; TextColor = UIColor.Black; }
return true; };
ShouldEndEditing = t => { if (string.IsNullOrEmpty(Text)) { TextColor = UIColor.Gray; Text = Placeholder; } return true; }; }
} }
|
If the provided solution doesn’t meet your requirement, could you please revert us back with more details regarding your requirement or modify the provided sample. So that it will be helpful for us to provide you possible solution.
Regards,
Vigneshkumar R