How to add a UIButton at runtime

前端 未结 5 1496
予麋鹿
予麋鹿 2020-12-31 05:23

I am trying to add a UIButton at runtime however it is not visible. What am I doing wrong?

- (id)initWithFrame:(CGRect)frame {
    if (self = [s         


        
5条回答
  •  难免孤独
    2020-12-31 05:43

    if it still doesn't work, try removing the : at the end of the selector name: @selector(buttonClick)

提交回复
热议问题