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

সুইফটে MBProgressHUD ব্যবহার করার পদ্ধতি


MBProgressHUD ব্যবহার করতে CocoaPods দিয়ে ইনস্টল করুন।

cd /projectDirectory
pod init
open podfile
# podfile-এ যোগ করুন: pod 'MBProgressHUD', '~> 1.1.0'
pod install

পদ্ধতি ১: viewDidLoad-এ সরাসরি

let indicator = MBProgressHUD.showAdded(to: self.view, animated: true)
indicator.label.text = "Indicator"
indicator.isUserInteractionEnabled = false
indicator.detailsLabel.text = "fetching details"
indicator.show(animated: true)

// লুকানোর জন্য:
MBProgressHUD.hide(for: self.view, animated: true)

পদ্ধতি ২: UIViewController এক্সটেনশন (গ্লোবালি ব্যবহারযোগ্য)

extension UIViewController {
    func showIndicator(withTitle title: String, and description: String) {
        let indicator = MBProgressHUD.showAdded(to: self.view, animated: true)
        indicator.label.text = title
        indicator.isUserInteractionEnabled = false
        indicator.detailsLabel.text = description
        indicator.show(animated: true)
    }
    func hideIndicator() {
        MBProgressHUD.hide(for: self.view, animated: true)
    }
}

ফলাফল —

সুইফটে MBProgressHUD ব্যবহার করার পদ্ধতি


  1. VPN ব্যবহার করে BitTorrent ক্লায়েন্ট কনফিগার করার পদ্ধতি

  2. জুম (Zoom) এ কাস্টম ব্যাকগ্রাউন্ড ব্যবহার করার পদ্ধতি

  3. বুট ক্যাম্প ব্যবহার করে ম্যাকে উইন্ডোজ ৭ ইনস্টল করার ধাপে ধাপে গাইড

  4. জিমেইল অ্যাকাউন্টকে আউটলুক সাথে সমস্যায় যোগ করুন