コード例 #1
0
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			this.View.BackgroundColor = UIColor.FromRGB (239, 239, 244);

			AddOption ("Contains", "Completion Modes", () => ContainsSelected());
			AddOption ("Starts With", "Completion Modes", () => PrefixSelected());

			AddOption ("Append","Suggest Modes", () => AppendSelected());
			AddOption ("Suggest-Append", "Suggest Modes", () => SuggestAppendSelected());
			AddOption ("Suggest", "Suggest Modes", () => SuggestSelected());
			this.SetSelectedOption (2, 1);

			this.Autocomplete = new TKAutoCompleteTextView(new CGRect(10, this.View.Bounds.Y + 10, this.View.Bounds.Size.Width - 20, 30));
			this.AutomaticallyAdjustsScrollViewInsets = false;

			this.Datasource = new TKDataSource ();
			this.Datasource.Settings.AutoComplete.CompletionMode = TKAutoCompleteCompletionMode.Contains;
			this.Datasource.LoadDataFromJSONResource("countries", "json", "data");
			this.Datasource.Settings.AutoComplete.CreateToken (delegate(nuint index, NSObject item) {
				TKAutoCompleteToken token = new TKAutoCompleteToken((NSString)(item.ValueForKey(new NSString("country"))));
				token.Image = UIImage.FromBundle((NSString)item.ValueForKey(new NSString("flag")));
				return token;
			});
				
			this.Autocomplete.WeakDataSource = this.Datasource;
			this.Autocomplete.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
			this.Autocomplete.TextField.Placeholder = "Choose country";
			this.Autocomplete.CloseButton.SetImage (UIImage.FromBundle ("clear.png"), UIControlState.Normal);
			this.Autocomplete.ImageView.Image = UIImage.FromBundle (new NSString("search.png"));
			this.Autocomplete.MinimumCharactersToSearch = 1;
			this.Autocomplete.SuggestionViewHeight = this.View.Bounds.Height - this.View.Bounds.Y + 45;
			this.View.AddSubview (this.Autocomplete);
		}
コード例 #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.View.BackgroundColor = UIColor.FromRGB(239, 239, 244);

            AddOption("Contains", "Completion Modes", () => ContainsSelected());
            AddOption("Starts With", "Completion Modes", () => PrefixSelected());

            AddOption("Append", "Suggest Modes", () => AppendSelected());
            AddOption("Suggest-Append", "Suggest Modes", () => SuggestAppendSelected());
            AddOption("Suggest", "Suggest Modes", () => SuggestSelected());
            this.SetSelectedOption(2, 1);

            this.Autocomplete = new TKAutoCompleteTextView(new CGRect(10, this.View.Bounds.Y + 10, this.View.Bounds.Size.Width - 20, 30));
            this.AutomaticallyAdjustsScrollViewInsets = false;

            this.Datasource = new TKDataSource();
            this.Datasource.Settings.AutoComplete.CompletionMode = TKAutoCompleteCompletionMode.Contains;
            this.Datasource.LoadDataFromJSONResource("countries", "json", "data");
            this.Datasource.Settings.AutoComplete.CreateToken(delegate(nuint index, NSObject item) {
                TKAutoCompleteToken token = new TKAutoCompleteToken((NSString)(item.ValueForKey(new NSString("country"))));
                token.Image = UIImage.FromBundle((NSString)item.ValueForKey(new NSString("flag")));
                return(token);
            });

            this.Autocomplete.WeakDataSource        = this.Datasource;
            this.Autocomplete.AutoresizingMask      = UIViewAutoresizing.FlexibleWidth;
            this.Autocomplete.TextField.Placeholder = "Choose country";
            this.Autocomplete.CloseButton.SetImage(UIImage.FromBundle("clear.png"), UIControlState.Normal);
            this.Autocomplete.ImageView.Image           = UIImage.FromBundle(new NSString("search.png"));
            this.Autocomplete.MinimumCharactersToSearch = 1;
            this.Autocomplete.SuggestionViewHeight      = this.View.Bounds.Height - this.View.Bounds.Y + 45;
            this.View.AddSubview(this.Autocomplete);
        }
コード例 #3
0
 public override TKAutoCompleteTokenView ViewForToken(TKAutoCompleteTextView autocomplete, TKAutoCompleteToken token)
 {
     TKAutoCompleteTokenView tokenView = new TKAutoCompleteTokenView(token);
     tokenView.BackgroundColor = new UIColor(0.090f, 0.537f, 0.965f, 1.00f);
     tokenView.Layer.CornerRadius = 10;
     tokenView.ImageView.Layer.CornerRadius = 10;
     return tokenView;
 }
コード例 #4
0
ファイル: AutoCompleteTokens.cs プロジェクト: tremors/ios-sdk
		public override TKAutoCompleteTokenView ViewForToken(TKAutoCompleteTextView autocomplete, TKAutoCompleteToken token)
		{
			TKAutoCompleteTokenView tokenView = new TKAutoCompleteTokenView(token);
			tokenView.BackgroundColor = UIColor.LightGray;
			tokenView.Layer.CornerRadius = 10;
			tokenView.ImageView.Layer.CornerRadius = 3;
			return tokenView;
		}
コード例 #5
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            this.View.BackgroundColor = UIColor.FromRGB(239, 239, 244);
            TKView view = new TKView(this.View.Bounds);

            view.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            view.Fill             = TKLinearGradientFill.WithColors(new UIColor[] {
                new UIColor(0.35f, 0.68f, 0.89f, 0.89f),
                new UIColor(0.35f, 0.68f, 1.0f, 1.0f),
                new UIColor(0.85f, 0.8f, 0.2f, 0.8f)
            });
            this.View.AddSubview(view);

            this.Autocomplete = new TKAutoCompleteTextView(new CGRect(10, this.View.Bounds.Y + 10, this.View.Bounds.Size.Width - 20, 35));
            this.Autocomplete.SuggestionViewOutOfFrame = true;
            this.AutomaticallyAdjustsScrollViewInsets  = false;

            this.Datasource = new TKDataSource();
            this.Datasource.LoadDataFromJSONResource("namesPhotos", "json", "data");
            this.Datasource.Settings.AutoComplete.CreateToken(delegate(nuint index, NSObject item) {
                TKAutoCompleteToken token = new TKAutoCompleteToken((NSString)(item.ValueForKey(new NSString("name"))));
                token.Image = UIImage.FromBundle((NSString)item.ValueForKey(new NSString("photo")));
                return(token);
            });

            TKListView listView = (TKListView)this.Autocomplete.WeakSuggestionView;

            listView.BackgroundColor = UIColor.Clear;
            listView.Frame           = new CGRect(10, this.View.Bounds.Y + 15 + this.Autocomplete.Bounds.Height, this.View.Bounds.Size.Width - 20, this.View.Bounds.Height - (15 + this.Autocomplete.Bounds.Height));
            listView.RemoveFromSuperview();
            listView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.View.AddSubview(listView);
            listView.RegisterClassForCell(new Class(typeof(ImageWithTextListViewCell)), "cell");

            TKListViewGridLayout layout = new TKListViewGridLayout();

            layout.ItemAlignment = TKListViewItemAlignment.Center;
            layout.SpanCount     = 2;
            layout.ItemSize      = new CGSize(150, 200);
            layout.LineSpacing   = 60;
            layout.ItemSpacing   = 10;
            listView.Layout      = layout;

            this.Autocomplete.SuggestMode           = TKAutoCompleteSuggestMode.SuggestAppend;
            this.Autocomplete.AutoresizingMask      = UIViewAutoresizing.FlexibleWidth;
            this.Autocomplete.MaximumWrapHeight     = 80;
            this.Autocomplete.WeakDataSource        = this.Datasource;
            this.Autocomplete.TextField.Placeholder = "Enter Users";
            this.Autocomplete.NoResultsLabel.Text   = "No Users Found";
            this.Autocomplete.CloseButton.SetImage(UIImage.FromBundle("clear.png"), UIControlState.Normal);
            this.Autocomplete.ImageView.Image       = UIImage.FromBundle(new NSString("search.png"));
            this.Autocomplete.BackgroundColor       = UIColor.White;
            this.Autocomplete.WeakDelegate          = autocompleteDelegate;
            this.Autocomplete.ShowAllItemsInitially = true;
            this.View.AddSubview(this.Autocomplete);
        }
コード例 #6
0
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			this.View.BackgroundColor = UIColor.FromRGB (239, 239, 244);
			TKView view = new TKView (this.View.Bounds);
			view.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			view.Fill = TKLinearGradientFill.WithColors (new UIColor[] { 
				new UIColor (0.35f, 0.68f, 0.89f, 0.89f), 
				new UIColor (0.35f, 0.68f, 1.0f, 1.0f), 
				new UIColor (0.85f, 0.8f, 0.2f, 0.8f)
			});
			this.View.AddSubview (view);

			this.Autocomplete = new TKAutoCompleteTextView (new CGRect (10, this.View.Bounds.Y + 10, this.View.Bounds.Size.Width-20, 35));
			this.Autocomplete.SuggestionViewOutOfFrame = true;
			this.AutomaticallyAdjustsScrollViewInsets = false;

			this.Datasource = new TKDataSource ();
			this.Datasource.LoadDataFromJSONResource ("namesPhotos", "json", "data");
			this.Datasource.Settings.AutoComplete.CreateToken (delegate(nuint index, NSObject item) {
				TKAutoCompleteToken token = new TKAutoCompleteToken ((NSString)(item.ValueForKey (new NSString ("name"))));
				token.Image = UIImage.FromBundle ((NSString)item.ValueForKey (new NSString ("photo")));
				return token;
			});

			TKListView listView = (TKListView)this.Autocomplete.WeakSuggestionView;
			listView.BackgroundColor = UIColor.Clear;
			listView.Frame = new CGRect (10, this.View.Bounds.Y + 15 + this.Autocomplete.Bounds.Height, this.View.Bounds.Size.Width-20, this.View.Bounds.Height - (15 + this.Autocomplete.Bounds.Height));
			listView.RemoveFromSuperview ();
			listView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
			this.View.AddSubview (listView);
			listView.RegisterClassForCell (new Class (typeof(ImageWithTextListViewCell)), "cell");

			TKListViewGridLayout layout = new TKListViewGridLayout ();
			layout.ItemAlignment = TKListViewItemAlignment.Center;
			layout.SpanCount = 2;
			layout.ItemSize = new CGSize (150, 200);
			layout.LineSpacing = 60;
			layout.ItemSpacing = 10;
			listView.Layout = layout;

			this.Autocomplete.SuggestMode = TKAutoCompleteSuggestMode.SuggestAppend;
			this.Autocomplete.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
			this.Autocomplete.MaximumWrapHeight = 80;
			this.Autocomplete.WeakDataSource = this.Datasource;
			this.Autocomplete.TextField.Placeholder = "Enter Users";
			this.Autocomplete.NoResultsLabel.Text = "No Users Found";
			this.Autocomplete.CloseButton.SetImage (UIImage.FromBundle ("clear.png"), UIControlState.Normal);
			this.Autocomplete.ImageView.Image = UIImage.FromBundle (new NSString ("search.png"));
			this.Autocomplete.BackgroundColor = UIColor.White;
			this.Autocomplete.WeakDelegate = autocompleteDelegate;
			this.Autocomplete.ShowAllItemsInitially = true;
			this.View.AddSubview (this.Autocomplete);
		}
コード例 #7
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.View.BackgroundColor = UIColor.FromRGB(239, 239, 244);

            // >> autocmp-feed-cs
            NSString[] sampleArrayOfStrings = new NSString[] { new NSString("Kristina Wolfe"),
                                                               new NSString("Freda Curtis"),
                                                               new NSString("Jeffery Francis"),
                                                               new NSString("Eva Lawson"),
                                                               new NSString("Emmett Santos"),
                                                               new NSString("Theresa Bryan"),
                                                               new NSString("Jenny Fuller"),
                                                               new NSString("Terrell Norris"),
                                                               new NSString("Eric Wheeler"),
                                                               new NSString("Julius Clayton"),
                                                               new NSString("Alfredo Thornton"),
                                                               new NSString("Roberto Romero"),
                                                               new NSString("Orlando Mathis"),
                                                               new NSString("Eduardo Thomas"),
                                                               new NSString("Harry Douglas") };
            // << autocmp-feed-cs

            // >> autocmp-src-cs
            this.dataSource = new TKDataSource(sampleArrayOfStrings);
            this.dataSource.Settings.AutoComplete.CreateToken(delegate(nuint index, NSObject item) {
                TKAutoCompleteToken token = new TKAutoCompleteToken((NSString)item);
                return(token);
            });
            // << autocmp-src-cs

            // >> autocmp-init-cs
            this.AutomaticallyAdjustsScrollViewInsets = false;
            TKAutoCompleteTextView autocomplete = new TKAutoCompleteTextView(new CGRect(10, 80, this.View.Bounds.Width - 20, 30));

            autocomplete.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
            autocomplete.WeakDataSource   = this.dataSource;
            this.View.AddSubview(autocomplete);
            // << autocmp-init-cs

            // >> autocmp-char-cs
            autocomplete.MinimumCharactersToSearch = 1;
            autocomplete.SuggestionViewHeight      = this.View.Bounds.Size.Height / 2;
            // << autocmp-char-cs

            // >> autocmp-completion-cs
            this.dataSource.Settings.AutoComplete.CompletionMode = TKAutoCompleteCompletionMode.StartsWith;
            // << autocmp-completion-cs

            // >> autocmp-suggestmode-cs
            autocomplete.SuggestMode = TKAutoCompleteSuggestMode.SuggestAppend;
            // << autocmp-suggestmode-cs
        }
コード例 #8
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            this.View.BackgroundColor = UIColor.FromRGB(239, 239, 244);

            this.Autocomplete = new TKAutoCompleteTextView(new CGRect(10, this.View.Bounds.Y + 10, this.View.Bounds.Size.Width - 10, 30));
            this.AutomaticallyAdjustsScrollViewInsets = false;

            this.Datasource = new TKDataSource();
            this.Datasource.LoadDataFromJSONResource("namesPhotos", "json", "data");
            this.Datasource.Settings.AutoComplete.CreateToken(delegate(nuint index, NSObject item) {
                TKAutoCompleteToken token = new TKAutoCompleteToken((NSString)(item.ValueForKey(new NSString("name"))));
                token.Image = UIImage.FromBundle((NSString)item.ValueForKey(new NSString("photo")));
                return(token);
            });

            TKListView listView = (TKListView)this.Autocomplete.WeakSuggestionView;

            listView.RegisterClassForCell(new Class(typeof(PersonListViewCell)), "cell");

            TKListViewGridLayout layout = new TKListViewGridLayout();

            layout.ItemAlignment = TKListViewItemAlignment.Center;
            layout.SpanCount     = 2;
            layout.ItemSize      = new CGSize(120, 150);
            layout.LineSpacing   = 20;
            layout.ItemSpacing   = 20;
            listView.Layout      = layout;

            // >> autocmp-display-mode-cs
            this.Autocomplete.DisplayMode = TKAutoCompleteDisplayMode.Tokens;
            // << autocmp-display-mode-cs

            // >> autocmp-layout-mode-cs
            this.Autocomplete.LayoutMode = TKAutoCompleteLayoutMode.Wrap;
            // << autocmp-layout-mode-cs
            this.Autocomplete.AutoresizingMask          = UIViewAutoresizing.FlexibleWidth;
            this.Autocomplete.MaximumWrapHeight         = 150;
            this.Autocomplete.WeakDataSource            = this.Datasource;
            this.Autocomplete.TextField.Placeholder     = "Enter Users";
            this.Autocomplete.NoResultsLabel.Text       = "No Users Found";
            this.Autocomplete.ImageView.Image           = UIImage.FromBundle(new NSString("search.png"));
            this.Autocomplete.MinimumCharactersToSearch = 1;
            this.Autocomplete.WeakDelegate         = autocompleteDelegate;
            this.Autocomplete.SuggestionViewHeight = this.View.Bounds.Height - this.View.Bounds.Y + 45;
            this.View.AddSubview(this.Autocomplete);
        }
コード例 #9
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

             NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidShowNotification, (notification) => {
                NSValue nsKeyboardBounds = (NSValue)notification.UserInfo.ObjectForKey(UIKeyboard.BoundsUserInfoKey);
                CGRect keyboardBounds = nsKeyboardBounds.RectangleFValue;
                var height = this.ExampleBounds.Height - keyboardBounds.Height;
                this.Autocomplete.SuggestionViewHeight = this.ExampleBounds.Height - (100 + height);
            });

            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidHideNotification, (notification) => {

                this.Autocomplete.SuggestionViewHeight = this.ExampleBounds.Height - 100;
            });

            this.Autocomplete = new TKAutoCompleteTextView(new CGRect(10, this.ExampleBounds.Y + 25, this.ExampleBounds.Size.Width - 10, 30));
            this.AutomaticallyAdjustsScrollViewInsets = false;

            UILabel title = new UILabel (new CGRect (10, this.ExampleBounds.Y, this.ExampleBounds.Width - 20, 20));
            title.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
            title.Text = "Shipping country:";
            this.View.AddSubview (title);

            this.Datasource = new TKDataSource ();
            this.Datasource.Settings.AutoComplete.CompletionMode = TKAutoCompleteCompletionMode.Contains;
            this.Datasource.LoadDataFromJSONResource("countries", "json", "data");
            this.Datasource.Settings.AutoComplete.CreateToken (delegate(nuint index, NSObject item) {
                TKAutoCompleteToken token = new TKAutoCompleteToken((NSString)(item.ValueForKey(new NSString("country"))));
                token.Image = new UIImage((NSString)item.ValueForKey(new NSString("flag")));
                return token;
            });

            this.Autocomplete.WeakDataSource = this.Datasource;
            this.Autocomplete.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
            this.Autocomplete.TextField.Placeholder = "Choose country";
            this.Autocomplete.CloseButton.SetImage (new UIImage ("clear.png"), UIControlState.Normal);
            this.Autocomplete.ImageView.Image = new UIImage (new NSString("search.png"));
            this.Autocomplete.MinimumCharactersToSearch = 1;
            this.Autocomplete.SuggestionViewHeight = this.ExampleBounds.Height - this.ExampleBounds.Y + 45;
            this.View.AddSubview (this.Autocomplete);
        }
コード例 #10
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidShowNotification, (notification) => {
                NSValue nsKeyboardBounds = (NSValue)notification.UserInfo.ObjectForKey(UIKeyboard.BoundsUserInfoKey);
                CGRect keyboardBounds    = nsKeyboardBounds.RectangleFValue;
                var height = this.ExampleBounds.Height - keyboardBounds.Height;
                this.Autocomplete.SuggestionViewHeight = this.ExampleBounds.Height - (100 + height);
            });

            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidHideNotification, (notification) => {
                this.Autocomplete.SuggestionViewHeight = this.ExampleBounds.Height - 100;
            });

            this.Autocomplete = new TKAutoCompleteTextView(new CGRect(10, this.ExampleBounds.Y + 25, this.ExampleBounds.Size.Width - 10, 30));
            this.AutomaticallyAdjustsScrollViewInsets = false;

            UILabel title = new UILabel(new CGRect(10, this.ExampleBounds.Y, this.ExampleBounds.Width - 20, 20));

            title.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
            title.Text             = "Shipping country:";
            this.View.AddSubview(title);

            this.Datasource = new TKDataSource();
            this.Datasource.Settings.AutoComplete.CompletionMode = TKAutoCompleteCompletionMode.Contains;
            this.Datasource.LoadDataFromJSONResource("countries", "json", "data");
            this.Datasource.Settings.AutoComplete.CreateToken(delegate(nuint index, NSObject item) {
                TKAutoCompleteToken token = new TKAutoCompleteToken((NSString)(item.ValueForKey(new NSString("country"))));
                token.Image = new UIImage((NSString)item.ValueForKey(new NSString("flag")));
                return(token);
            });

            this.Autocomplete.WeakDataSource        = this.Datasource;
            this.Autocomplete.AutoresizingMask      = UIViewAutoresizing.FlexibleWidth;
            this.Autocomplete.TextField.Placeholder = "Choose country";
            this.Autocomplete.CloseButton.SetImage(new UIImage("clear.png"), UIControlState.Normal);
            this.Autocomplete.ImageView.Image           = new UIImage(new NSString("search.png"));
            this.Autocomplete.MinimumCharactersToSearch = 1;
            this.Autocomplete.SuggestionViewHeight      = this.ExampleBounds.Height - this.ExampleBounds.Y + 45;
            this.View.AddSubview(this.Autocomplete);
        }
コード例 #11
0
ファイル: AutoCompleteTokens.cs プロジェクト: tremors/ios-sdk
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			this.View.BackgroundColor = UIColor.FromRGB (239, 239, 244);

			this.Autocomplete = new TKAutoCompleteTextView(new CGRect(10, this.View.Bounds.Y + 10, this.View.Bounds.Size.Width - 10, 30));
			this.AutomaticallyAdjustsScrollViewInsets = false;

			this.Datasource = new TKDataSource ();
			this.Datasource.LoadDataFromJSONResource("namesPhotos", "json", "data");
			this.Datasource.Settings.AutoComplete.CreateToken (delegate(nuint index, NSObject item) {
				TKAutoCompleteToken token = new TKAutoCompleteToken((NSString)(item.ValueForKey(new NSString("name"))));
				token.Image = UIImage.FromBundle((NSString)item.ValueForKey(new NSString("photo")));
				return token;
			});

			TKListView listView = (TKListView)this.Autocomplete.WeakSuggestionView;
			listView.RegisterClassForCell (new Class(typeof(PersonListViewCell)), "cell");

			TKListViewGridLayout layout = new TKListViewGridLayout();
			layout.ItemAlignment = TKListViewItemAlignment.Center;
			layout.SpanCount = 2;
			layout.ItemSize = new CGSize (120, 150);
			layout.LineSpacing = 20;
			layout.ItemSpacing = 20;
			listView.Layout = layout;

			this.Autocomplete.DisplayMode = TKAutoCompleteDisplayMode.Tokens;
			this.Autocomplete.LayoutMode = TKAutoCompleteLayoutMode.Wrap;
			this.Autocomplete.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
			this.Autocomplete.MaximumWrapHeight = 150;
			this.Autocomplete.WeakDataSource = this.Datasource;
			this.Autocomplete.TextField.Placeholder = "Enter Users";
			this.Autocomplete.NoResultsLabel.Text = "No Users Found";
			this.Autocomplete.ImageView.Image = UIImage.FromBundle (new NSString("search.png"));
			this.Autocomplete.MinimumCharactersToSearch = 1;
			this.Autocomplete.WeakDelegate = autocompleteDelegate;
			this.Autocomplete.SuggestionViewHeight = this.View.Bounds.Height - this.View.Bounds.Y + 45;
			this.View.AddSubview (this.Autocomplete);
		}
コード例 #12
0
		public override void DidAddToken(TKAutoCompleteTextView autocomplete, TKAutoCompleteToken token)
		{
			((TKListView)autocomplete.WeakSuggestionView).ScrollToItem (((TKSuggestionListView)autocomplete.WeakSuggestionView). SelectedIndexPath, UICollectionViewScrollPosition.Top, true);
		}
コード例 #13
0
 public override void DidAddToken(TKAutoCompleteTextView autocomplete, TKAutoCompleteToken token)
 {
     ((TKListView)autocomplete.WeakSuggestionView).ScrollToItem(((TKSuggestionListView)autocomplete.WeakSuggestionView).SelectedIndexPath, UICollectionViewScrollPosition.Top, true);
 }
コード例 #14
0
        public override TKAutoCompleteTokenView ViewForToken(TKAutoCompleteTextView autocomplete, TKAutoCompleteToken token)
        {
            TKAutoCompleteTokenView tokenView = new TKAutoCompleteTokenView(token);

            tokenView.BackgroundColor              = UIColor.LightGray;
            tokenView.Layer.CornerRadius           = 10;
            tokenView.ImageView.Layer.CornerRadius = 5;
            return(tokenView);
        }
コード例 #15
0
        public override TKAutoCompleteTokenView ViewForToken(TKAutoCompleteTextView autocomplete, TKAutoCompleteToken token)
        {
            TKAutoCompleteTokenView tokenView = new TKAutoCompleteTokenView(token);

            tokenView.BackgroundColor              = new UIColor(0.090f, 0.537f, 0.965f, 1.00f);
            tokenView.Layer.CornerRadius           = 10;
            tokenView.ImageView.Layer.CornerRadius = 10;
            return(tokenView);
        }
コード例 #16
0
 public override void DidRemoveToken(TKAutoCompleteTextView autocomplete, TKAutoCompleteToken token)
 {
     this.tokens.Remove(token.Text);
     tKDataFormAutoCompleteInlineEditor.Value = this.tokens.ToNSObject();
 }