UIButton title disappears

前端 未结 5 1655
囚心锁ツ
囚心锁ツ 2021-01-20 03:52

I have a ViewController with an UIButton inside. When I clicked, the text on the button disappeared. I add all the setTitle for all states, but it continues disappearing. An

5条回答
  •  抹茶落季
    2021-01-20 04:47

    I guess you need to use [self.commit setTitle: NSLocal..., actually use self.commit overall for assignments (when you use @property (nonatomic, retain) or strong with ARC). I use @synthesize commit = _commit; and then only _commit for all the rest of the module.

提交回复
热议问题