यहां मेरा कोड है, किसी भी मदद की बहुत सराहना की है धन्यवाद! यह स्विफ्ट में एक्सकोड में लिखा गया था। मैं त्रुटि है कि कहा गया है बार आ रही है "एक लाइन पर लगातार घोषणाओं द्वारा अलग किया जाना चाहिए ';' 'मैं स्विफ्ट में यह त्रुटि प्राप्त कर रहा हूं। "एक लाइन पर अभिसरण घोषणा अलग होनी चाहिए ';'
import UIKit
class View Controller: UIViewController {
@IBOutlet var outputLabel: UILabel! = UILabel()
var currentCount : Int = 0
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func addOneButton(sender: UIButton) {
currentCount = currentCount + 1
if(currentCount <= 1) {
outputLabel.text = "The button has been clicked 1 time!"
outputLabel.textColor = UIColor.purpleColor()
}
else {
outputLabel.text = "The button has been clicked \(currentCount) number of times."
outputLabel.textColor = UIColor.redColor()
var Hello: UILabel! {
if(currentCount >= 5) {
outputLabel.text = "Don't Forget To Give A GOOD Rating! :D"
outputLabel.textColor = UIColor.orangeColor()
}
else {
outputLabel.text = "Nothing To See Here..."
}
कौन सा लाइन आप त्रुटि मिलता है? –