-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3 more delegate methods added to detect an action #94
Open
lsamaria
wants to merge
3
commits into
chronotruck:master
Choose a base branch
from
lsamaria:patch-6
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on May 30, 2019
-
Added 3 delegate methods to detect an action
The FPNTextField() has 3 components that assist it when the user decides to enter their phone number: 1. tapping the flag itself triggers the pickerView to show all the flags 2. tapping the Done button on the keyboard dismisses the pickerView with all the flags 3. tapping the instance of the FPNTextField() also dismisses the pickerView with all the flags Every UI is different, inside the my app I have an additional "NextButton" that is inside the vc that contains the FPNTextField(). 1. func detectWhenFlagIsTapped() // option to do something when the flag is tapped -when the flag is tapped, the keyboard switches from numeric to show the pickerView with all the flags, I may want to disable the NextButton because it wouldn't make any sense to have it enabled knowing the user is in the process of choosing a country (the pickerView flags are on screen). 2. func detectWhenDoneButtonTapped() // option to do something when the Done button is tapped -if the pickerView with the flags are on screen, when the Done button that is on top of the keyboard is tapped, I may want to enable or disable my NextButton. 3. func detectWhenTextFieldTapped() // option to do something when the instance of the fpnTextField is tapped -if the pickerView with the flags are on screen, when the instance of the FPNTextField() is tapped (meaning the user is entering their phone number), I may want to enable or disable my NextButton. All 3 of these delegate methods are set inside the FPNTextField class in the following: func detectWhenFlagIsTapped() is set in the displayCountryKeyboard() method func detectWhenDoneButtonTapped() is set in the resetKeyBoard() method func detectWhenTextFieldTapped() is added inside the FPNTextField class as an additional target method's selector: addTarget(self, action: #selector(textFieldTapped), for: .editingChanged)
Configuration menu - View commit details
-
Copy full SHA for d92217a - Browse repository at this point
Copy the full SHA d92217aView commit details -
Added 3 more delegate methods to detect an action
The FPNTextField() has 3 components that assist it when the user decides to enter their phone number: 1. tapping the flag itself triggers the pickerView to show all the flags 2. tapping the Done button on the keyboard dismisses the pickerView with all the flags 3. tapping the instance of the FPNTextField() also dismisses the pickerView with all the flags Every UI is different, inside the my app I have an additional "NextButton" that is inside the vc that contains the FPNTextField(). 1. When the flag is tapped, the keyboard switches from numeric to show the pickerView with all the flags, I wanted to disable the NextButton because it wouldn't make any sense to have it enabled knowing the user is in the process of choosing a country (the pickerView flags are on screen). 2. If the pickerView with the flags are on screen, when the Done button that is on top of the keyboard is tapped, I may want to enable or disable my NextButton. 3. If the pickerView with the flags are on screen, when the instance of the FPNTextField() is tapped (meaning the user is entering their phone number), I may want to enable or disable my NextButton. All 3 of these delegate methods are set inside the FPNTextField class in the following: func detectWhenFlagIsTapped() // set in the displayCountryKeyboard() method func detectWhenDoneButtonTapped() // set in the resetKeyBoard() method func detectWhenTextFieldTapped() // added inside the FPNTextField class as an additional target method's selector: addTarget(self, action: #selector(textFieldTapped), for: .editingChanged)
Configuration menu - View commit details
-
Copy full SHA for d253eec - Browse repository at this point
Copy the full SHA d253eecView commit details -
3 more delegate methods added to detect actions
The FPNTextField() has 3 components that assist it when the user decides to enter their phone number: 1. tapping the flag itself triggers the pickerView to show all the flags 2. tapping the Done button on the keyboard dismisses the pickerView with all the flags 3. tapping the instance of the FPNTextField() also dismisses the pickerView with all the flags Every UI is different, inside the my app I have an additional "NextButton" that is inside the vc that contains the FPNTextField(). 1. When the flag is tapped, the keyboard switches from numeric to show the pickerView with all the flags, I wanted to disable the NextButton because it wouldn't make any sense to have it enabled knowing the user is in the process of choosing a country (the pickerView flags are on screen). 2. If the pickerView with the flags are on screen, when the Done button that is on top of the keyboard is tapped, I may want to enable or disable my NextButton. 3. If the pickerView with the flags are on screen, when the instance of the FPNTextField() is tapped (meaning the user is entering their phone number), I may want to enable or disable my NextButton. All 3 of these delegate methods are set inside the FPNTextField class in the following: func detectWhenFlagIsTapped() // set in the displayCountryKeyboard() method func detectWhenDoneButtonTapped() // set in the resetKeyBoard() method func detectWhenTextFieldTapped() // added inside the FPNTextField class as an additional target method's selector: addTarget(self, action: #selector(textFieldTapped), for: .editingChanged)
Configuration menu - View commit details
-
Copy full SHA for 2e077fd - Browse repository at this point
Copy the full SHA 2e077fdView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.