MLKitBarcodeScanning Framework রেফারেন্স
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
বারকোড স্ক্যানার
class BarcodeScanner : NSObject
একটি বারকোড স্ক্যানার যা একটি ছবিতে বারকোড স্ক্যান করে।
প্রদত্ত বিকল্পগুলির সাথে একটি বারকোড স্ক্যানার প্রদান করে।
ঘোষণা
সুইফট
class func barcodeScanner(options: MLKBarcodeScannerOptions) -> Self
পরামিতি
options | বারকোড স্ক্যানার কনফিগারেশন ধারণকারী বিকল্প। |
রিটার্ন ভ্যালু
প্রদত্ত বিকল্পগুলির সাথে কনফিগার করা একটি বারকোড স্ক্যানার৷
ডিফল্ট বিকল্পগুলির সাথে একটি বারকোড স্ক্যানার প্রদান করে।
ঘোষণা
সুইফট
class func barcodeScanner() -> Self
রিটার্ন ভ্যালু
ডিফল্ট বিকল্পগুলির সাথে কনফিগার করা একটি বারকোড স্ক্যানার৷
অনুপলব্ধ ক্লাস পদ্ধতি ব্যবহার করুন।
বারকোড স্ক্যানিংয়ের জন্য প্রদত্ত চিত্রটি প্রক্রিয়া করে।
পরামিতি
image | প্রক্রিয়া করার জন্য ছবি. |
completion | বারকোড স্ক্যান বা ত্রুটি সহ প্রধান সারিতে ফিরে কল করার জন্য হ্যান্ডলার৷ |
প্রদত্ত চিত্রে বারকোড ফলাফল প্রদান করে বা কোনো ত্রুটি থাকলে nil
। বারকোড স্ক্যানিং কলিং থ্রেডে সিঙ্ক্রোনাসভাবে সঞ্চালিত হয়।
UI ব্লক করা এড়াতে মূল থ্রেড থেকে এই পদ্ধতিটিকে কল করার পরামর্শ দেওয়া হচ্ছে। ফলস্বরূপ, একটি NSException
উত্থাপিত হয় যদি এই পদ্ধতিটিকে মূল থ্রেডে কল করা হয়।
পরামিতি
image | |
error | একটি ঐচ্ছিক ত্রুটি পরামিতি পপুলেট যখন ফলাফল পেতে একটি ত্রুটি আছে. |
রিটার্ন ভ্যালু
বারকোডের অ্যারে প্রদত্ত চিত্রে ফলাফল দেয় বা কোনো ত্রুটি থাকলে nil
।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-01-07 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-01-07 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["`BarcodeScanner` is a class used for scanning barcodes within images."],["It provides methods to create a scanner instance with custom or default options."],["The `process(_:)` method asynchronously scans an image for barcodes and returns the results."],["The `results(in:)` method synchronously scans an image, but it should be called off the main thread to avoid blocking the UI."]]],["The `BarcodeScanner` class scans barcodes within images. It offers two class methods, `barcodeScanner(options:)` and `barcodeScanner()`, to create instances, either with custom or default configuration options. The `process(_:)` method asynchronously scans an image for barcodes, returning an array of `MLKBarcode` objects. The method `results(in:)` synchronously returns barcode results in a given image. Note that attempting to use the main thread when invoking the method `results(in:)` will raise an error.\n"]]