summaryrefslogtreecommitdiff
path: root/CocoaSharp/UIKit/UINavigationItem.cs
blob: 87fa8b3eb241bd634d3aff55772e65eefa1f0f83 (plain)
1
using ObjectiveC;
using System;
using SharpSwift.Attributes;
using System.Collections.Generic;
using Foundation;
using CoreGraphics;

namespace UIKit
{
    /// <summary>
    /// A UINavigationItem object manages the buttons and views to be displayed in a UINavigationBar object. When building a navigation interface, each view controller pushed onto the navigation stack must have a UINavigationItem object that contains the buttons and views it wants displayed in the navigation bar. The managing UINavigationController object uses the navigation items of the topmost two view controllers to populate the navigation bar with content.
    /// </summary>
    /// <see cref="https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UINavigationItem_Class/index.html#//apple_ref/occ/cl/UINavigationItem"/>
    [iOSVersion(2)]
    public class UINavigationItem : NSObject//, AnyObject, NSCoding, NSObjectProtocol
    {
        public UINavigationItem() { }
        /// <summary>
        /// Returns a navigation item initialized with the specified title.
        /// </summary>
        /// <param name="title">The string to set as the navigation item’s title displayed in the center of the navigation bar.</param>
        [iOSVersion(2)]
        public UINavigationItem(string title) { }
        
        /// <summary>
        /// Sets whether the back button is hidden, optionally animating the transition.
        /// </summary>
        /// <param name="hidesBackButton">Specify true if the back button should be hidden when this navigation item is the top item. Specify false if the back button should be visible, assuming it has not been replaced by a custom item.</param>
        /// <param name="animated">true to animate the transition; otherwise, false.</param>
        [iOSVersion(2)]
        [Export("setHidesBackButton")]
        public virtual void SetHidesBackButton(bool hidesBackButton, bool animated) {  }
        
        /// <summary>
        /// Sets the left bar button items, optionally animating the transition to the new items.
        /// </summary>
        /// <param name="items">An array of custom bar button items to display on the left side of the navigation bar.</param>
        /// <param name="animated">Specify true to animate the transition to the custom bar items when this item is the top item. Specify false to set the items immediately without animating the change.</param>
        [iOSVersion(5)]
        [Export("setLeftBarButtonItems")]
        public virtual void SetLeftBarButtonItems(AnyObject[] items, bool animated) {  }
        
        /// <summary>
        /// Sets the custom bar button item, optionally animating the transition to the new item.
        /// </summary>
        /// <param name="item">A custom bar item to display on the left side of the navigation bar.</param>
        /// <param name="animated">Specify true to animate the transition to the custom bar item when this item is the top item. Specify false to set the item immediately without animating the change.</param>
        [iOSVersion(2)]
        [Export("setLeftBarButtonItem")]
        public virtual void SetLeftBarButtonItem(UIBarButtonItem item, bool animated) {  }
        
        /// <summary>
        /// Sets the right bar button items, optionally animating the transition to the new items.
        /// </summary>
        /// <param name="items">An array of custom bar button items to display on the right side of the navigation bar.</param>
        /// <param name="animated">Specify true to animate the transition to the custom bar items when this item is the top item. Specify false to set the items immediately without animating the change.</param>
        [iOSVersion(5)]
        [Export("setRightBarButtonItems")]
        public virtual void SetRightBarButtonItems(AnyObject[] items, bool animated) {  }
        
        /// <summary>
        /// Sets the custom bar button item, optionally animating the transition to the view.
        /// </summary>
        /// <param name="item">A custom bar item to display on the right of the navigation bar.</param>
        /// <param name="animated">Specify true to animate the transition to the custom bar item when this item is the top item. Specify false to set the item immediately without animating the change.</param>
        [iOSVersion(2)]
        [Export("setRightBarButtonItem")]
        public virtual void SetRightBarButtonItem(UIBarButtonItem item, bool animated) {  }
        
        /// <summary>
        /// The navigation item’s title displayed in the center of the navigation bar.
        /// </summary>
        [iOSVersion(2)]
        [Export("title")]
        public string Title { get; set; }
        
        /// <summary>
        /// A single line of text displayed at the top of the navigation bar.
        /// </summary>
        [iOSVersion(2)]
        [Export("prompt")]
        public string Prompt { get; set; }
        
        /// <summary>
        /// The bar button item to use when a back button is needed on the navigation bar.
        /// </summary>
        [iOSVersion(2)]
        [Export("backBarButtonItem")]
        public UIBarButtonItem BackBarButtonItem { get; set; }
        
        /// <summary>
        /// A Boolean value that determines whether the back button is hidden.
        /// </summary>
        [iOSVersion(2)]
        [Export("hidesBackButton")]
        public bool HidesBackButton { get; set; }
        
        /// <summary>
        /// A Boolean value indicating whether the left items are displayed in addition to the back button.
        /// </summary>
        [iOSVersion(5)]
        [Export("leftItemsSupplementBackButton")]
        public bool LeftItemsSupplementBackButton { get; set; }
        
        /// <summary>
        /// A custom view displayed in the center of the navigation bar when the receiver is the top item.
        /// </summary>
        [iOSVersion(2)]
        [Export("titleView")]
        public UIView TitleView { get; set; }
        
        /// <summary>
        /// An array of custom bar button items to display on the left side of the navigation bar when the receiver is the top navigation item.
        /// </summary>
        [iOSVersion(5)]
        [Export("leftBarButtonItems")]
        public AnyObject[] LeftBarButtonItems { get; set; }
        
        /// <summary>
        /// A custom bar button item displayed on the left of the navigation bar when the receiver is the top navigation item.
        /// </summary>
        [iOSVersion(2)]
        [Export("leftBarButtonItem")]
        public UIBarButtonItem LeftBarButtonItem { get; set; }
        
        /// <summary>
        /// An array of custom bar button items to display on the right side of the navigation bar when the receiver is the top navigation item.
        /// </summary>
        [iOSVersion(5)]
        [Export("rightBarButtonItems")]
        public AnyObject[] RightBarButtonItems { get; set; }
        
        /// <summary>
        /// A custom bar button item displayed on the right of the navigation bar when the receiver is the top navigation item.
        /// </summary>
        [iOSVersion(2)]
        [Export("rightBarButtonItem")]
        public UIBarButtonItem RightBarButtonItem { get; set; }
    }
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback