在xcode中增加变量名? [英] incrementing variable names in xcode?

查看:31
本文介绍了在xcode中增加变量名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

增加变量名

在 xcode 中,我想创建 100 个图像,其中一个名称为 1、2、3、4 等.除了变量名之外,我可以做所有的事情.对于这些我徘徊是否可以通过编程方式增加变量还是必须手动完成?

In xcode I want to create 100 images one with the name1,2,3,4 ect. And i can do it all except for the variable names. For these I was wandering is it possible to increment the variables programmatically or whether it must be done manually?

推荐答案

您可以使用字典对象,以名称为键,以图像对象为数据,而不是创建一堆变量名.

Instead of creating a bunch of variable names, you can use a dictionary object with the names as keys and the image object as the data.

这篇关于在xcode中增加变量名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆