Comments (13)
@tjsingh04 Did you check the example project?
from nkvphonepicker.
yes i was checked , i think the problem is pre fill text of country code in the textfield, when i remove country code then it show the placeholder but i need it even if country code is there.
from nkvphonepicker.
Place your code or project here.
from nkvphonepicker.
set NKVPhonePickerTextField
directly from storyboard and create its outlet shown as below
@IBOutlet weak var phoneTF: NKVPhonePickerTextField!
and in viewDidLoad is have use below code
phoneTF.phonePickerDelegate = self
phoneTF.placeholder = "Phone Number"
phoneTF.flagInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 0)
phoneTF.layer.cornerRadius = 10
from nkvphonepicker.
you can also check in your sample project as well. placeholder only shows when remove country code from it. but i need it with country code if you can help.
here are the screenshoots
from nkvphonepicker.
Hmm, the plus is too close to flag also. What phone model is it?
Fix your message markdown pls.
from nkvphonepicker.
plus is closed, becoz of flagInsets
i think and phone model is iphone XR 12.2 version
from nkvphonepicker.
Sorry, but the textField is using a standard placeholder and i don't see how to easily change its behaviour.
However you can set a little hack like:
textField.countryPickerDelegate = self
extension ViewController: CountriesViewControllerDelegate {
func countriesViewController(_ sender: CountriesViewController, didSelectCountry country: Country) {
print("✳️ Did select country: \(country)")
textField.placeholder = country.phoneExtension
}
}
Also tell what you exactly want to achieve?
from nkvphonepicker.
i just want to show place holder just like my second screenshoot, but it only show when i remove whole text from textfield i.e when remove country code, means place holder is not shown with country code added in textfield as you see in first screenshoot , it shows when i remove country code (refer to 2nd screenshoot).
i want to show place holder with country code added in textfield. now do you get my point?
from nkvphonepicker.
from nkvphonepicker.
yes i think so, is there any other hack for it
from nkvphonepicker.
from nkvphonepicker.
okay Thanks Brother
from nkvphonepicker.
Related Issues (20)
- Could not build Objective-C module 'NKVPhonePicker' HOT 4
- Appcenter.ms: Illegal character '?' NKVPhonePicker/Sources/Bundle/Countries.bundle/Images/?.png HOT 2
- NKVPhonePickerTextField.swift twice in project HOT 2
- Swift 4.2 HOT 1
- How to customize NKVFlagView ? HOT 5
- How to open NKVFlagView when user click on textField HOT 1
- Keeping getting crash in NKVPhonePickerPresenter class on textField.flagView.setFlag(with: source) HOT 2
- Who needs a carthage support? HOT 1
- Use as independent view HOT 1
- Same country codes change conuntry flag HOT 2
- Swift Package Manager support HOT 1
- How can I use UITextFiledDelegate Methods like Should change characters with nkvtextfields HOT 1
- Plus Symbol is not centre for country code HOT 1
- RLT Support ? HOT 1
- Error: 'inset(by:)' has been renamed to 'UIEdgeInsetsInsetRect(_:_:)'
- How can validate the phone number with country code? HOT 1
- Provide a way to disable the phone formatting calls within the library; formatting functions are broken
- Dark Mode Support HOT 1
- SPM - Crash when presenting CountriesViewController
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nkvphonepicker.