-2
arc4random我有代碼IBOutlet中與swift3.0
class ViewController: UIViewController {
var detailText: String = "Chance of win is 50%"
@IBOutlet weak var winChance: UILabel!
func someMethod() -> Void {
print("Method called!")
}
override func viewDidLoad() {
super.viewDidLoad()
self.winChance.text = self.detailText
} }
我怎樣才能使這個50%arc4random? 如果我用「(VAR)」的東西卻是不由你想要的標籤文字是我 日Thnx
'取勝的機會是「randomnubmer」'? – JuicyFruit
是............ –