আমি যখন এটি করছি তখন সংকলকটির কাছ থেকে অভিযোগ পাওয়া
class ViewController: UIViewController {
var delegate : AppDelegate
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
//self.appDelegate = UIApplication.sharedApplication().delegate;
}
@IBAction func getData(sender : AnyObject) {
}
@IBAction func LogOut(sender : AnyObject) {
}
}
তবে, আমি কি শুধু যুক্ত করব ? AppDelegate শেষে নীচের মত এবং ত্রুটি চলে গেছে।
class ViewController: UIViewController {
var delegate : AppDelegate?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
//self.appDelegate = UIApplication.sharedApplication().delegate;
}
@IBAction func getData(sender : AnyObject) {
}
@IBAction func LogOut(sender : AnyObject) {
}
}
আমি optional
ভুল না হলে আমি এই ত্রুটির সাথে প্রাসঙ্গিক কীওয়ার্ডটি দেখতে পাচ্ছি না ।