Comments (5)
Weirdly, in using my own picker, I haven't seen this behaviour - but I don't call resignFirstResponder on the field manually.
I've changed the addToken method to make the field become first responder before adding the token. Seems to work.
from titokenfield.
Sorry, for the confusion. Your last fix didn't really help with this problem.
The solution was to change the call order in the picker delegates. First the picker view needs to be dismissed and then the addToken method should be used. This way everything works fine. If you try to add a token before dismissing the picker it will screw up the results.
from titokenfield.
I'm confused a little; You're saying it's nothing to do with the TITokenField? You just needed to change some stuff in your own code?
from titokenfield.
It has something to do with TITokenfield and the issue is related to the responder chain.
I'm using the built in people picker and this way it won't work:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
[tokenFieldView.tokenField addToken:@"SomeName"];
[self dismissModalViewControllerAnimated:YES];
return NO;
}
The reason for this is that the addToken method won't work correctly as long as another UI element is first responder, because all tokenNames need to be drawn before another one can be added. Changing the order in this example and first dismissing the modal view and then using addToken works just fine.
from titokenfield.
Oh I see - well for now, obviously just swap the lines so it works.
I'll keep looking into it.
from titokenfield.
Related Issues (20)
- Crash when presenting controller with token field become first responder
- prompt text color should be customizable
- don't show separator if not showing search results table
- New input with a token highlighted should replace the token
- TOken Edit
- Edit
- Placeholder font is system only
- when I add a new token if I push to next VC the token will be removed
- Tokens are not visible HOT 5
- Implementing in tableviewcontroller it is work in iPad but list is not visible in iPhone
- إضافة عنوان
- - (void)didEndEditing gets called on tapping a token after 3rd row using multiple TITokenFieldViews HOT 8
- On iOS 7+, scrollView's contentOffset is set so that the table cannot be scrolled to top HOT 1
- TITokenField layoutTokensAnimated creshes the app whiling loading mail body
- Missing touches in an UITableViewCell
- TITokenField cannot work with Chinese IME
- TITokenFieldView with clear background HOT 3
- Adding too many tokens makes the app unusable HOT 1
- how to change the TIToken's background color and selected color? HOT 1
- Tokens center alignment HOT 1
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 titokenfield.