0
我想在Scrollview中顯示標籤和按鈕。 有人可以告訴我這是怎麼完成的?在ScrollView中添加標籤Xcode Swift
@IBOutlet weak var PeopleView: UIScrollView!
var button = UIButton.buttonWithType(UIButtonType.System) as UIButton
button.frame = CGRectMake("INSIDE SCROLL.VIEW", "INSIDE SCROLL.VIEW", 183, 21)
button.backgroundColor = UIColor.greenColor()
button.setTitle("Button", forState: UIControlState.Normal)
button.addTarget(self, action: "Action:", forControlEvents: UIControlEvents.TouchUpInside)
self.view.addSubview(button)
非常完美的:) - 謝謝! – Heinevolder 2014-11-21 13:51:43