コード例 #1
0
        void Pull(ScrollRectEvents.PullDirection direction)
        {
            var items = ListView.DataSource;

            switch (direction)
            {
            case ScrollRectEvents.PullDirection.Up:
                items.Insert(0, new ListViewIconsItemDescription()
                {
                    Name = "New item. Total: " + (items.Count + 1)
                });

                Info.text = "New item added.";
                break;

            case ScrollRectEvents.PullDirection.Down:
                StartCoroutine(AddItems());

                break;
            }
        }
コード例 #2
0
 void PullAllowed(ScrollRectEvents.PullDirection direction)
 {
     Info.text = "Pull event will be raised on drag release.";
 }
コード例 #3
0
 void PullCancel(ScrollRectEvents.PullDirection direction)
 {
     Info.text = "Pull event canceled.";
 }