diff --git a/CHANGELOG.md b/CHANGELOG.md index 82e9b26..9e163a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [2.7.5](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/2.7.5) (2018-02-12) +[Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/milestone/28?closed=1) + + ## [2.7.4](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/2.7.4) (2017-12-15) [Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/milestone/27?closed=1) diff --git a/README.md b/README.md index 8818c7a..b7be237 100755 --- a/README.md +++ b/README.md @@ -45,6 +45,51 @@ From the command prompt go to your app's root folder and execute: tns plugin add nativescript-barcodescanner ``` +## Embedding the scanner on an existing page (iOS) + + + +As you can see, you can style the view any way you like, and even overlay it with an image or button. +To recreate the layout above, look at [these lines in the demo app](https://github.com/EddyVerbruggen/nativescript-barcodescanner/blob/23395bec3e5a26622146daea96dd6407a8413f70/demo/app/main-page.xml#L17-L31). + +### XML +```xml + +``` + +```xml + + + +``` + +### Embedding in Angular +Component: + +```typescript +import { registerElement } from "nativescript-angular/element-registry"; +registerElement("BarcodeScanner", () => require("nativescript-barcodescanner").BarcodeScannerView); +``` + +View: + +```html + + +``` + ## iOS runtime permission reason You've probably seen a permission popup like this before (this plugin will trigger one as well, automatically): diff --git a/docs/ios_embedded_scanner.png b/docs/ios_embedded_scanner.png new file mode 100644 index 0000000..80777e6 Binary files /dev/null and b/docs/ios_embedded_scanner.png differ diff --git a/src/package.json b/src/package.json index 1ad0c5c..94079c9 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-barcodescanner", - "version": "2.7.4", + "version": "2.7.5", "description": "Scan QR/barcodes with your NativeScript app.", "main": "barcodescanner", "typings": "index.d.ts",