UIPopupList:将这个组件添加到Button上,即可构建一个下拉列表。

效果图如下:

一:使用步骤

  1.首先创建一个Sprite作为button。

  

  2.创建一个label,用于显示当前选择的选项。

  

  3.为Sprite添加以下组件

  

  4.配置UIPopup List组件

  

  Options:设置下拉列表中的元素。

  Default:默认显示的值。

  Position:列表的显示位置,上或下。

  Localized:这个和cvs可以集合一下使用。

  Atlas:设置效果贴图。

  Font:设置字体信息。

  On Value Change:用于绑定Label,显示当前的选择值。

  获得当前值的代码:

  

  使用方法如下:

  

  源码地址如下:http://download.csdn.net/detail/as294985925/7317573

  项目结构如下:

  

最新文章

  1. [LeetCode] Reverse String 翻转字符串
  2. UINavigationController和UIScrollView一起使用时导致UIScrollView位置偏移
  3. CentOS 7 运行级别切换
  4. Hadoop分布式安装
  5. TreeSet集合
  6. Linux命令——创建删除文件
  7. 淘宝异构数据源数据交换工具 DataX
  8. zabbix3.2源码搭建
  9. ScalaPB(0): 找寻合适的内部系统微服务集成工具
  10. laravel之路由
  11. [视频]K8飞刀 Discuz csrf Exp教程
  12. < meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />的意义
  13. Android back键及backWebview模式跳转详解
  14. linux ssh和scp消除每次问yes/no
  15. Linux驱动技术(二) _访问I/O内存
  16. 进程间通信 IPC(Inter-Process Communication)
  17. ASPX 后台调用前台Js
  18. RegExp.prototype.exec()使用技巧
  19. angular 辅助路由
  20. Oracle数据库大量library cache: mutex X及latch: shared pool问题排查一例

热门文章

  1. Solr学习、安装与Quick Start
  2. http://www.cnblogs.com/shortboy/p/4429368.html
  3. Kafka查看偏移量报错:WARN WARNING: ConsumerOffsetChecker is deprecated and will be dropped in releases following 0.9.0. Use ConsumerGroupCommand instead.
  4. android: android中dip、dp、px、sp和屏幕密度
  5. node.js开发平台
  6. grid 布局一 固定宽度+自适应宽度
  7. Tabs or Spaces?
  8. centos mysql iptables配置
  9. Spring Cloud简单入门教程
  10. redis内存分析(转)