UIKit.UIViewController.SearchDisplayController Property
The UIKit.UISearchDisplayController, if any, associated with this UIKit.UIViewController.

Syntax

[ObjCRuntime.Availability(Deprecated=ObjCRuntime.Platform.iOS_8_0, Message="With iOS 8, instead of using UISearchDisplayController, you are encouraged to create a UISearchController instead.")]
[get: Foundation.Export("searchDisplayController")]
[get: ObjCRuntime.Availability(Deprecated=ObjCRuntime.Platform.iOS_8_0, Message="With iOS 8, instead of using UISearchDisplayController, you are encouraged to create a UISearchController instead.")]
public virtual UISearchDisplayController SearchDisplayController { get; }

Value

The default value is null.

Remarks

Application developeres may specify a UIKit.UISearchDisplayController using Interface Builder or programmatically. To assign the UIViewController.SearchDisplayController property, the UIKit.UIViewController must have a field of type UIKit.UISearchBar decorated with [Outlet] (Foundation.OutletAttribute) and must initialize a new UIKit.UISearchDisplayController with a reference to that UIKit.UISearchBar. As shown in the following code, the assignment of the UIKit.UISearchDisplayController to UIViewControlle.SearchDisplayController is done implicitly during initialization, and does not involve the application developer assigning the reference to the newly-created UIKit.UISearchDisplayController:

C# Example

public override void ViewDidLoad ()
{
    base.ViewDidLoad ();

    //this.SearchDisplayController == null
    //n.b.: No assignment 
    new UISearchDisplayController (mySearchBar, this);
    //this.SearchDisplayController != null         
    Console.WriteLine ("SearchDisplayController = '{0}'", this.SearchDisplayController);
}

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0