jjzjj

codedButton2

全部标签

Swift - 在刚刚添加的按钮右侧自动添加一个按钮

我设置了一个UIScrollView,我正在使用addSubView向它添加5个按钮。这是我的viewDidLoad中的代码。letcodedButton:UIButton=UIButton(frame:CGRectMake(0,0,100,50))codedButton.backgroundColor=UIColor.redColor()codedButton.setTitle("Button1",forState:UIControlState.Normal)codedButton.addTarget(self,action:#selector(ViewController.butt