Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个应用程序,其中一些按钮会产生不同的图像。每次按下其中一个按钮时,创建的 imageView 都应该有一个唯一的名称。
我的想法是在imageView的名称中添加一个变量,比如“ImageView+i”,其中“i”每次按下按钮时都会递增,并且开始出现更多不同名称的imageView。我知道这是不可能的,但它是用地图。
关于如何用 Map 实现这一点的任何想法?