Skip to content

Commit 3177eb8

Browse files
committed
Added PasswordField to Readme
Another component added.
1 parent 3c85045 commit 3177eb8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

README.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@ This is a Swift Package containing Swift code and Utilities/Assets, such as Colo
2020

2121
#### InlinePicker
2222

23-
<p align="center" width="100%">
24-
<img src=" https://raw.githubusercontent.com/NordicPlayground/IOS-Common-Libraries/main/inlinePicker.jpg">
25-
</p>
26-
2723
![InlinePicker](https://raw.githubusercontent.com/NordicPlayground/IOS-Common-Libraries/main/inlinePicker.jpg)
2824

2925
The main use case for this UI Component is to basically have an alternative of macOS' Segmented Control but for iOS, including iOS-derived platforms such as the Mac via Catalyst. It took a lot of setup to have a Picker that didn't "push" the UI and the user towards a new View, which we found can be very distracting. So we came up with `InlinePicker` View, and we didn't just use it in nRF Connect, it's also gone on to become a staple in other projects such as the Wi-Fi Provisioner App.
3026

27+
#### PasswordField
28+
29+
![PasswordField](https://raw.githubusercontent.com/NordicPlayground/IOS-Common-Libraries/main/passwordField.jpg)
30+
31+
> [!NOTE]
32+
> The above screenshot is from nRF Edge Impulse, which is applying custom styling to PasswordField.
33+
34+
nRF Edge Impulse was our team's first "REST-based client", let's say. As such, we had to handle networking and user account details. This included password input which, as we know, is handled by the existing ![SecureField](https://developer.apple.com/documentation/swiftui/securefield) component. But, to our surprise, there's no way to allow the user to explicitly see what they're typing. We could've just dismissed the issue, but even to us when using the app it was a big nuissance. So we wrote it, initially just for nRF Edge Impulse. And then a similar need arose for nRF Wi-Fi Provisioner. So we refactored it out, allowing nRF Edge Impulse to keep its UI design, but allowing it to look more system-like for nRF Wi-Fi Provisioner.
35+
3136
### Colors
3237

3338
The swatch of Nordic colors is available here for our own use. We're keeping to the [DRY Principle](https://wiki.c2.com/?DontRepeatYourself) of course, but the side-benefit of this is that updating the colors in one place, automagically updates all of our apps.

passwordField.jpg

28.3 KB
Loading

0 commit comments

Comments
 (0)