让标签出现在子视图上
你好,我正在创建一个应用程序,你必须在其中挤掉粉刺。现在我有了它,每次你挤掉一个痘痘时,一个名为 popcount 文本的 UILabel 就会+1。我有另一个隐藏的标签,称为分数,我说它应该具有与 popcount 文本相同的文本。您有 10 秒的时间来挤掉尽可能多的粉刺。一旦计时器达到 0,就会添加游戏结束子视图。我说过score.hidden = NO; 但是当我这么说时,标签不会出现在子视图上。很可能就在它的后面。我该如何解决这个问题,以便它可以出现在子视图上。
我正在使用 Xcode
Hi I am creating an app where you have to pop pimples. Right now I have it so that everytime you pop a pimple, a UILabel called popcount text is +1. I have another label that I have set hidden called the score which I stated should have the same text as popcount text. You have 10 seconds to pop as many pimples as you can . Once the timer reaches 0 a gameover subview is added. I have said that the score.hidden = NO;
But when I say this the label does not appear on the subview. It is probably behind it. How can I fix this so it can be on the subview.
I am using Xcode
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当你说score.hidden = NO;在 [self.view BringSubviewToFront:score] 下面添加这一行;
When you said score.hidden = NO; add this line below [self.view bringSubviewToFront:score];