davbeck / turecipientbar Goto Github PK
View Code? Open in Web Editor NEWA UIView to handle entering recipients similar to iOS Mail
License: Other
A UIView to handle entering recipients similar to iOS Mail
License: Other
This element is potentially very useful on the iPad as well.
If it supports the iPad, state this on the README!
I'm writing a typical message compose component. In a reply scenario, I want to pre-fill the bar with recipients. Even though everything gets instantiated correctly in my viewDidLoad, I get a runtime exception each time...
Here a code snippet:
if(_replyFrom) {
self.title = @"Reply";
titleView.text = [@"Re: " stringByAppendingString:_replyFrom.title];
_recipientsBar.userInteractionEnabled = NO;
[_recipientsBar addRecipient:[TURecipient recipientWithTitle:@"author full name" address:@"[email protected]"]];
}
Here's what I get in the console:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSConcreteAttributedString initWithString:: nil value'
The label to the left that normally shows "To" should be able to be hidden. In addition, the text of the label should be able to be changed.
We are using TURecipientsDisplayController and we believe there may be a retain cycle. The property contentsController
is strong and when the view controller creates and holds a TURecipientsDisplayController
, it never gets deallocated. I was unable to find a reason for the property to be strong, but I may have missed something.
It would be nice to have an animated GIF of the bar in action, showing how it expands and animates smoothly and how recipients are added and removed.
The bar should have style properties that use UIAppearance.
When installing via CocoaPods I seem to be pulling an old version of TURecipientsBar.h
and TURecipientsBar.mwhich doesn't even include
setSearchFieldTextAttributes`.
I notice that the TURecipientBar.podspec
file was last committed 9 months ago while the TURecipientsBar
files were committed 3 months ago. Perhaps the .podspec
file needs updated? (I'm not personally familiar with publishing on CocoaPods, just installing from it.)
The parameter attributes
is saved in _searchFieldTextAttributes
but then _summaryTextAttributes
is used.
To set it I'm forced to call setSummaryTextAttributes
and then setSearchFieldTextAttributes
.
Thanks!
Great project!
However, I cannot input Chinese in the TURecipientBar.
After a quick investigation, I found that there's a - (void)_manuallyChangeTextField:(UITextField *)textField inRange:(NSRange)range replacementString:(NSString *)string
method which changes the textField's text before a multistage text input completes. TURecipientBar does not work with any other multistage text input method as well.
The bar should have a property to set a placeholder string. This string would be shown in the _summaryLabel but grayed out when there are no recipients.
The recipients bar cannot scroll as it should.
I see the following error in the console each time a recipient is added to the TURecipientsBar:
<Error>: CGAffineTransformInvert: singular matrix.
It appears to be originating in the addRecipient:
method in TURecipientsBar.m from:
recipientView.transform = CGAffineTransformMakeScale(0.0, 0.0);
Since a zero matrix does not have an inverse, we appear to be seeing the above error. Is this transform necessary? Any thoughts or help would be appreciated.
While calling becomeFirstResponder in swift facing crash after creating the IPA file. In Debug mode its running well but in release mode it crashes.
Log after crash
Thread : Crashed: com.apple.main-thread
0 ewConnect 0x00000001002ce4a0 function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of ewConnect.ChatThreadComposer.keyboardWillToggle (ewConnect.ChatThreadComposer)(ObjectiveC.NSNotification) -> () (ChatThreadComposer.swift:132)
1 ewConnect 0x00000001002cbcf8 @objc ewConnect.ChatThreadComposer.keyboardWillToggle (ewConnect.ChatThreadComposer)(ObjectiveC.NSNotification) -> () (ChatThreadComposer.swift)
2 CoreFoundation 0x0000000182a0a2c4 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 20
3 CoreFoundation 0x0000000182947450 _CFXNotificationPost + 2060
4 Foundation 0x0000000183876a80 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
5 UIKit 0x0000000187ba3b64 -[UIInputWindowController postStartNotifications:withInfo:] + 404
6 UIKit 0x0000000187ba5678 __77-[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke628 + 444
7 UIKit 0x00000001874d9770 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options
8 UIKit 0x00000001875a628c +[UIView(UIViewAnimationWithBlocks) _animateWithDuration:delay:options:animations:start:completion:] + 68
9 UIKit 0x0000000187ba534c -[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:] + 948
10 UIKit 0x0000000187ba8de8 -[UIInputWindowController setInputViewSet:] + 568
11 UIKit 0x0000000187ba4cf4 -[UIInputWindowController performOperations:withAnimationStyle:] + 60
12 UIKit 0x00000001875671e8 -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:] + 988
13 UIKit 0x0000000187526e44 -[UIResponder becomeFirstResponder] + 568
14 UIKit 0x0000000187527118 -[UIView(Hierarchy) becomeFirstResponder] + 124
15 UIKit 0x0000000187656158 -[UITextView becomeFirstResponder] + 80
16 ewConnect 0x0000000100071bac -PHFComposeBarView becomeFirstResponder
17 ewConnect 0x00000001002cadb8 @objc ewConnect.ChatThreadComposer.viewDidAppear (ewConnect.ChatThreadComposer)(Swift.Bool) -> () (ChatThreadComposer.swift:58)
18 UIKit 0x00000001874bbfc0 -[UIViewController _setViewAppearState:isAnimating:] + 592
19 UIKit 0x00000001874bc52c -[UIViewController _endAppearanceTransition:] + 344
20 UIKit 0x0000000187571368 -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 1000
21 UIKit 0x00000001874dc2dc -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 188
22 UIKit 0x00000001874da4a8 +[UIViewAnimationState popAnimationState] + 332
23 UIKit 0x0000000187564550 -[UINavigationTransitionView transition:fromView:toView:] + 1744
24 UIKit 0x0000000187559f9c -[UINavigationController startDeferredTransitionIfNeeded:] + 640
25 UIKit 0x0000000187559cbc -[UINavigationController viewWillLayoutSubviews] + 56
26 UIKit 0x0000000187559c3c -[UILayoutContainerView layoutSubviews] + 200
27 UIKit 0x00000001874a1760 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 580
28 QuartzCore 0x0000000186de9e1c -[CALayer layoutSublayers] + 152
29 QuartzCore 0x0000000186de4884 CA::Layer::layout_if_needed(CA::Transaction) + 320
30 QuartzCore 0x0000000186de4728 CA::Layer::layout_and_display_if_needed(CA::Transaction) + 32
31 QuartzCore 0x0000000186de3ebc CA::Context::commit_transaction(CA::Transaction) + 276
32 QuartzCore 0x0000000186de3c3c CA::Transaction::commit() + 528
33 QuartzCore 0x0000000186ddd364 CA::Transaction::observer_callback(_CFRunLoopObserver, unsigned long, void*) + 80
34 CoreFoundation 0x0000000182a1c2a4 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 32
35 CoreFoundation 0x0000000182a19230 __CFRunLoopDoObservers + 360
36 CoreFoundation 0x0000000182a19610 __CFRunLoopRun + 836
37 CoreFoundation 0x00000001829452d4 CFRunLoopRunSpecific + 396
38 GraphicsServices 0x000000018c15b6fc GSEventRunModal + 168
39 UIKit 0x000000018750afac UIApplicationMain + 1488
40 ewConnect 0x00000001003f253c main (AppDelegate.swift:17)
41 libdyld.dylib 0x0000000194906a08 start + 4
In addition to the auto layout example, there should be an example of how someone would use the bar in a traditional layout environment.
When the result is a little bigger than couple,
The keyboard gets in the way.
Any ideas?
The bar should have a property to disable the search table view.
Hi Guys,
Is there a way to keep the items in "token mode" after finishing the selection (dismiss keyboard) and not have it minimized to a one line list?
TURecipientBar
should have a property to hide the add button.
it's somewehere in textFieldShouldEndEditing but if label contains only text and lost focus, then text disappear and placeholder is visible.
record: http://f.cl.ly/items/2A0B2x3o0a3r0Z253r3q/TURecipientBar.mov
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.