From 323f6ffc9dbc71edf28d9f1b6bcee6958c896607 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 8 Oct 2022 16:08:22 +0400 Subject: [PATCH] Update readme --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 11d6df2..2c3a7bc 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,17 @@ Each device has an `all` property. Use this to find, filter, map etc. The follow ### Find the generation of current device ```swift -let identifier = // Use a method shown in ## Alternatives +let identifier = "iPad3,6" let iPhone = iPhone.all.first { $0.identifier == identifier } -iPhone.generation // iPhone 11 Pro Max +iPhone.generation // iPad (4th generation) +``` + +### Find the generation of current device using subscript + +```swift +let identifier = "iPad3,6" +let iPhone = DeviceList().all[identifer] +iPhone.generation // iPad (4th generation) ``` ### List all available colors of the iPad Air 2 64 GB