Get an Int out of an UILabel Swift

后端 未结 6 1897
执笔经年
执笔经年 2021-01-20 17:22

I have the problem, to have a high amount of buttons which have a number as their label, so i thought i could take the label as an integer instead of creating an action for

6条回答
  •  庸人自扰
    2021-01-20 18:20

    Another way to convert a label in swift:

    let num = getIntFromLabel(labelView)

提交回复
热议问题