Skip to content
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

Fixed For Xcode4.6,customize abbreviation and token height #72

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kmyhy
Copy link

@kmyhy kmyhy commented Nov 26, 2013

  1. Fixed: Property ' edgesForExtendedLayout' not found

'edgesForExtendedLayout' is only available in iOS 7.0 or later. If you
compile 'TokenFieldExample' in iOS 6.1 SDK, you should get this error.
You can check for it at compile-time using something like:

if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000

if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
    self.edgesForExtendedLayout = UIRectEdgeNone;

endif

  1. Add 'abbr' property

I used property 'abbr' and category ' NSString+truncateToSize' if
users like customize their untoken text like 'Victoria Delgadillo... 4
联系人' rather than default '3 recipients'.

  1. can designate height

By default, the token field's height is fixed to 43 px.
In iPad,it is fine.In iPhone,it is too tall. Maybe we should shorten it
to 24 px so we can save more screen dimensions.
Specify the frame parameter in ' initWithFrame ' no help for it.I
refined the code so users can customize the token field's height.

1.	Fixed: Property ' edgesForExtendedLayout' not found
'edgesForExtendedLayout' is only available in iOS 7.0 or later. If you
compile 'TokenFieldExample' in iOS 6.1 SDK, you should get this error.
You can check for it at compile-time using something like:
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
    if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeNone;
#endif
2.	Add 'abbr' property
I used property 'abbr'  and category ' NSString+truncateToSize' if
users like customize their untoken text like 'Victoria Delgadillo... 4
联系人' rather than default '3 recipients'.

3.	can designate height
By default, the token field's height is fixed to 43 px.
In iPad,it is fine.In iPhone,it is too tall. Maybe we should shorten it
to 24 px so we can save more screen dimensions.
Specify  the frame parameter in ' initWithFrame ' no help for it.I
refined the code so users can customize the token field's height.
Verbatim auto-searching always reault in UI stoping responding when
source array is very huge. It is always a good thing to allow user to
close the auto-searching feature although we can perform a background
search. Meanwhile should allow user to execute a manual search when
user need.This commit is just that.
It is conventional to design a clear background color for UI
component.But it's not easy to archive this with TITokenField.This
commit worked fine.
Steps to reproduce:
1. Run TokenFieldExamle in iPad
2. Touches the search button without type anything
3. App crashed,see the console
Commit 'forbit
auto-searching'(SHA:81311ee01656fc44202acbaa0c96e238bffcaac2 ) causes
this bug.
This commit fixed it.
This commit allow to define a touch up inside callback function for
specific token.
… dismissed!

Steps to reproduce:
1. Open TokenFieldExample project, add this line to  viewDidLoad method in TokenFieldExampleViewController.m:
[_tokenFieldView setForcePickSearchResult:YES];
2. Run TokenFieldExample on iPad(not simulator).
3. Touch the token field and do not input any word.
4. The keyboard popup, but click the "dismiss keyboard button" nothing happening.
If run on iOS 6, "dismiss keyboard button" just work fine.But on iOS 7,the keyboard does not disappear, it just stays there. The user can still navigate through back navigation bar button, but all text fields are disabled, meaning you can't enter text anywhere. The only option the user has is killing the app and starting fresh.
Try to send resignFirstResponder messages, but no help anything.
This commit fixed it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant