I'm trying to add a SearchBar into a RelativeLayout in Xamarin.Forms. It displays correctly on Android, but not on iOS. Has anyone run into this issue before, and know how to fix it? Here's the code snippet:
public class SearchPage : ContentPage
{
private SearchBar searchBar;
public SearchPage ()
{
searchBar = new SearchBar() {
Placeholder = "Search"
};
var layout = new RelativeLayout();
layout.Children.Add(searchBar,
Constraint.Constant(0),
Constraint.RelativeToParent((parent) => {
return parent.Y + 200;
}));
}));
Content = layout;
}
}