কম্পিউটার টিউটোরিয়াল

সুইফটে আইওএস অ্যাপে কাস্টম ডায়লগ বক্স (Custom Dialog Box) তৈরির পদ্ধতি


UIAlertController ব্যবহার করে কাস্টম ডায়লগ বক্স তৈরি করুন।

func createAlert(withTitle title: String, andDescription description: String) {
    let alert = UIAlertController(title: title, message: description, preferredStyle: .alert)
    let okAction = UIAlertAction(title: "Ok", style: .default) { _ in
        print("You tapped ok")
        // custom action here
    }
    alert.addAction(okAction)
    self.present(alert, animated: true, completion: nil)
}

override func viewWillLayoutSubviews() {
    self.createAlert(withTitle: "This is an alert", andDescription: "Enter your description here.")
}

ফলাফল —

সুইফটে আইওএস অ্যাপে কাস্টম ডায়লগ বক্স (Custom Dialog Box) তৈরির পদ্ধতি


  1. iOS অ্যাপে Tab Bar Layout তৈরি করার পদ্ধতি

  2. অ্যান্ড্রয়েডে কাস্টম ডায়লগ বক্স তৈরি করার পদ্ধতি

  3. অ্যান্ড্রয়েড অ্যাপে কাস্টম অ্যালার্ট ডায়ালগ তৈরির পদ্ধতি

  4. CSS ব্যবহার করে কাস্টম কার্সর তৈরি করা