Esempio n. 1
0
            public override void CancelButtonClicked(UISearchBar searchBar)
            {
                //Reset the parent
                foreach (var s in _searchElements)
                {
                    s.Element.Parent = s.Parent;
                }

                searchBar.Text = "";
                searchBar.ShowsCancelButton = false;
                _container.FinishSearch();
                searchBar.ResignFirstResponder();
                _container.NavigationController.SetNavigationBarHidden(false, true);
                _container.IsSearching             = false;
                _container.TableView.ScrollEnabled = true;

                _searchController.RemoveFromParentViewController();
                _searchController.View.RemoveFromSuperview();

                if (_searchController.Root != null)
                {
                    _searchController.Root.Clear();
                }

                _searchElements.Clear();
                _searchElements = null;
            }