citrrus / mbcontactpicker Goto Github PK
View Code? Open in Web Editor NEWiOS7 Styled Contact Picker Library that uses a UICollectionView
License: MIT License
iOS7 Styled Contact Picker Library that uses a UICollectionView
License: MIT License
Hi, I get the error "Unknown type name UIImage" for MBContactModel.h when I try to implement my own contact model - I guess because it doesn't import UIKit. This is in xcode 6.1.1 and cocoapods is importing MBContactPicker 0.1.4.
Thanks.
@MattCBowman How do you feel about this? I think it would be nice to have consistency across the library. If I'm using MBContactPicker but I decide I need more control, it would be nice to just use MBContactCollectionView. It would also play nicely with auto-complete! β‘
Plz fix this issue.if we set the placeholder then last character is deleting from the text field.
On the iPhone 6/6+ when you have the landscape keyboard, clicking on a preexisting item then clicking the 'forward' and 'backwards' arrow will cause the application to crash with something like the following:
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[MBContactCollectionView selectedTextRange]:
unrecognized selector sent to instance 0x13c902c00'
By implementing the UITextInput protocol I can prevent it from crashing however you can't continue to go forward and back once you've selected an item in the picker.
Setup 3 contact pickers in one view, each with an initial height of 30 and with a spacing of 0. When you try and click on them, you can only select the view that is furthest back in the view hierarchy (first one in the order in a Storyboard).
When I run it on an ios 7.0 simulator, this issue is not there. Switch to the 7.1 simulator and it doesn't work.
I'll start looking through the source to figure out what changed, however if anyone else has experienced or fixed this already, please let me know.
Our picker is embedded in a table cell with a disclosure arrow which provides an alternate means of selecting contacts, for people who do not know anything about the available set to choose from (and therefore have no idea what to start typing) when they are first using the app.
The issue occurs if there is a contact selected in the picker when this alternate view is pushed to, for example:
When the alternate selection view controller pops back to the table with the picker in it, even if no changes are made to the picker contents, the selected contact is rendered incorrectly, and remains that way until it is tapped on (or backspaced into) and then tapped away from:
An even stranger result can be seen in a slightly different flow. Again, starting with a contact selected:
This time the alternate controller is used to add another contact to the set that are being displayed by the picker. Now, the formerly-selected contact is drawn as normal but not selected, while both other contacts are drawn as opaque blue rectangles, again until each is tapped on and then off of:
This happens even though we call [self.distributionListPicker resignFirstResponder];
in the tableView:didSelectRowAtIndexPath:
handler which is pushing to the secondary view controller. If, however, we tap on a different table row, thereby taking over the first responder, then go back to the picker row, the contact shows as not selected, and pushing to and from the alternate view controller does not lead to any rendering issues.
Instead of providing a static array at the set up it would be more useful to return results depending on what the user typed in the field dynamically. (Would allow to fetch the contact from a web server for example or some kind of database.)
It would be nice to be able to plug this in and have it automatically pull in the device's address book as an option. This would make the library even easier to use.
It doesn't make sense to have the name and the parameters reference the contactcollectionview, it should be the contactpickerview.
The method delegate method - (void)contactPicker:(MBContactPicker*)contactPicker didEnterCustomText:(NSString*)text
never gets called on the delegate. I took a quick look at the code and it is not being used anywhere from what I can see. Was this a feature that was going to be added then was not?
From the context it look like this method was supposed to fire if I added some text that was not included in the list of contacts. Is that right?
Please help me out in adding MBContactPicker to a UITableViewCell.
Sample code for adding MBContactPicker to UITableViewCell would be great.
It seems right now the MBContactPicker only filters base upon a "CONTAINS" with the contactTitle, but objects with the contactSubtitle are subsequently not searched.
How do I make it so the library searches across all variables in the model?
Looks like iOS 8 support is broken. No keyboard on click (though it accepts support from external keyboards).
I'll take a look into it, but can't guarantee I'll get anything back.
use of undeclared identifier '_focused' in MBContactCollectionViewContactCell.m, line 87. I'm using the podfile for installation.
https://github.com/Citrrus/MBContactPicker/blob/master/MBContactPicker/ContactPickerView.m#L212 makes it difficult to use the ContactPickerView on a screen that has multiple controls and you want a different one to be the first responder (or none at all!)
Since the contact picker is designed to have similar behaviour as apple's native email app's contact picker. So it should make its keyboard type to be email keyboard, or let the user to decide by themselves.
I fully accept that this may be a failure on our part rather than an issue with the picker; there may be a method we should call upon auto-rotation to let the picker know about and deal with it, but I could not find any pointers to that in the read me file, so here is what find. When starting with a contact with a long name in portrait mode, the width is set up to fit nicely:
However, upon rotating to landscape mode, the size stays small:
Removing and re-adding the contact from the list does get it re-created with an appropriate width:
However, at that point, rotating back to portrait leaves it too long to fit the view, and yields errors in the log:
2014-01-15 17:34:13.276 Cirrus[9748:70b] the behavior of the UICollectionViewFlowLayout is not defined because:
2014-01-15 17:34:13.276 Cirrus[9748:70b] the item width must be less that the width of the UICollectionView minus the section insets left and right values.
2014-01-15 17:34:13.277 Cirrus[9748:70b] Please check the values return by the delegate.
2014-01-15 17:34:28.022 Cirrus[9748:70b] Did Select: A list with an excessively long name
Again, deleting and re-adding the contact causes it to have the correct width,
The method -(void) contactcollectionView:(MBContactCollectionView *)contactCollectionView didEnterCustomContact:(NSString*)text
can be called on the MBContactPickerDelegate
. However, this method suffers from two problems:
-(void) contactCollectionView:(MBContactCollectionView *)contactCollectionView didEnterCustomContact:(NSString*)text
MBContactPickerDelegate
protocol, but there is a completely unused method called - (void)contactPicker:(MBContactPicker*)contactPicker didEnterCustomText:(NSString*)text;
. I Imagine this this method was meant to have the same function as the misnamed method, but some how got overlooked.Both super easy fixes. If I get a few moments later today I'll send a pull request.
This had been working before, but as of tonight (using the master branch), when our picker is set up to contain contacts during the initial display of the view which contains it, they do not display properly. I suspect this may be due to the new approach to handling an empty prompt. Indeed, a quick test confirms that these problems go away if I leave the prompt at its default value of To:
but occur when setting it to the empty string.
With a single contact present, the picker appears empty. But clicking on the right edge of the picker places the insertion point to the right of where the invisible contact should be. Trying to click on that invisible contact places the insertion point at the beginning of the line (leftmost edge of the picker). And trying to backspace over the invisible contact results in a crash:
2014-01-14 21:09:54.690 Cirrus[17973:70b] -[MBContactCollectionViewEntryCell setFocused:]: unrecognized selector sent to instance 0x144654e0
2014-01-14 21:09:54.696 Cirrus[17973:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MBContactCollectionViewEntryCell setFocused:]: unrecognized selector sent to instance 0x144654e0'
*** First throw call stack:
(
0 CoreFoundation 0x030f55e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02e788b6 objc_exception_throw + 44
2 CoreFoundation 0x03192903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x030e590b ___forwarding___ + 1019
4 CoreFoundation 0x030e54ee _CF_forwarding_prep_0 + 14
5 Cirrus 0x000a2d73 -[MBContactCollectionView collectionView:didSelectItemAtIndexPath:] + 195
6 Cirrus 0x000a4189 -[MBContactCollectionView textField:shouldChangeCharactersInRange:replacementString:] + 729
7 UIKit 0x0209a7b6 -[UITextField keyboardInputShouldDelete:] + 252
8 UIKit 0x01b88ba7 -[UIKeyboardImpl callShouldDeleteWithWordCountForRapidDelete:characterCountForRapidDelete:] + 691
9 UIKit 0x01b93985 -[UIKeyboardImpl deleteFromInputWithExecutionContext:] + 84
10 UIKit 0x01b90415 -[UIKeyboardImpl handleDeleteAsRepeat:executionContext:] + 130
11 UIKit 0x01b9ec1f -[UIKeyboardImpl handleKeyWithString:forKeyEvent:executionContext:] + 633
12 UIKit 0x01b9e766 -[UIKeyboardImpl handleKeyEvent:executionContext:] + 1808
13 UIKit 0x01b9dfbf __33-[UIKeyboardImpl handleKeyEvent:]_block_invoke + 51
14 UIKit 0x020c23c8 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 402
15 UIKit 0x020c2a6f -[UIKeyboardTaskQueue addTask:] + 144
16 UIKit 0x01b9df84 -[UIKeyboardImpl handleKeyEvent:] + 227
17 UIKit 0x019c740b -[UIApplication _handleKeyUIEvent:] + 330
18 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
19 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
20 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
21 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
22 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
23 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
24 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
25 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
26 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
27 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
28 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
29 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
30 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
31 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
32 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
33 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
34 UIKit 0x01b0dfa4 -[UIResponder(Internal) _handleKeyUIEvent:] + 59
35 UIKit 0x019c72ba -[UIApplication handleKeyUIEvent:] + 84
36 UIKit 0x019c725e -[UIApplication handleKeyHIDEvent:] + 458
37 UIKit 0x019af07c _UIApplicationHandleEventQueue + 2954
38 CoreFoundation 0x0307e83f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
39 CoreFoundation 0x0307e1cb __CFRunLoopDoSources0 + 235
40 CoreFoundation 0x0309b29e __CFRunLoopRun + 910
41 CoreFoundation 0x0309aac3 CFRunLoopRunSpecific + 467
42 CoreFoundation 0x0309a8db CFRunLoopRunInMode + 123
43 GraphicsServices 0x052299e2 GSEventRunModal + 192
44 GraphicsServices 0x05229809 GSEventRun + 104
45 UIKit 0x019b3d3b UIApplicationMain + 1225
46 Cirrus 0x0002daed main + 141
47 libdyld.dylib 0x03aed70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
With three initial contacts present, taking more than one line, the initial rendering of the view crashes as follows:
2014-01-14 21:03:36.411 Cirrus[17931:70b] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-2903.23/UITableView.m:1330
2014-01-14 21:03:36.417 Cirrus[17931:70b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 2. The number of rows contained in an existing section after the update (0) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
*** First throw call stack:
(
0 CoreFoundation 0x030f55e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02e788b6 objc_exception_throw + 44
2 CoreFoundation 0x030f5448 +[NSException raise:format:arguments:] + 136
3 Foundation 0x00cf3fee -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 UIKit 0x01a8485d -[UITableView _endCellAnimationsWithContext:] + 13402
5 UIKit 0x01a93caa -[UITableView endUpdatesWithContext:] + 51
6 UIKit 0x01a93cd8 -[UITableView endUpdates] + 41
7 Cirrus 0x0001e7c9 -[ComposeViewController contactPicker:didUpdateContentHeightTo:] + 201
8 Cirrus 0x000aad0b -[MBContactPicker contactCollectionView:willChangeContentSizeTo:] + 475
9 Cirrus 0x000a37ae -[MBContactCollectionView collectionView:willChangeContentSizeTo:] + 270
10 Cirrus 0x000a7a9a -[MBContactCollectionViewFlowLayout finalizeCollectionViewUpdates] + 362
11 UIKit 0x01fdab3f __37-[UICollectionView _updateWithItems:]_block_invoke1214 + 1774
12 UIKit 0x01a16282 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 484
13 UIKit 0x01a16622 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 108
14 UIKit 0x01fda16a -[UICollectionView _updateWithItems:] + 2097
15 UIKit 0x01fd5978 -[UICollectionView _endItemAnimations] + 14317
16 UIKit 0x01fdb4c4 -[UICollectionView _endUpdates] + 44
17 UIKit 0x01fdb66b -[UICollectionView performBatchUpdates:completion:] + 418
18 Cirrus 0x000a9aec -[MBContactPicker reloadData] + 812
19 Cirrus 0x000a8a83 -[MBContactPicker didMoveToWindow] + 339
20 UIKit 0x01a19077 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1689
21 UIKit 0x01a18cd7 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 761
22 UIKit 0x01a18cd7 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 761
23 UIKit 0x01a2a707 -[UIScrollView _didMoveFromWindow:toWindow:] + 65
24 UIKit 0x01a18cd7 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 761
25 UIKit 0x01a18cd7 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 761
26 UIKit 0x01a18cd7 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 761
27 UIKit 0x01a2a707 -[UIScrollView _didMoveFromWindow:toWindow:] + 65
28 UIKit 0x01a10500 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 162
29 Foundation 0x00ec738c -[NSISEngine withBehaviors:performModifications:] + 107
30 Foundation 0x00d56f05 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
31 UIKit 0x01a103bd -[UIView(Hierarchy) _postMovedFromSuperview:] + 313
32 UIKit 0x01a1b4c1 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1847
33 UIKit 0x01a0e9b1 -[UIView(Hierarchy) addSubview:] + 56
34 UIKit 0x019aae05 -[_UIParallaxDimmingView didMoveToWindow] + 129
35 UIKit 0x01a19077 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1689
36 UIKit 0x01a18cd7 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 761
37 UIKit 0x01a10500 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 162
38 Foundation 0x00ec738c -[NSISEngine withBehaviors:performModifications:] + 107
39 Foundation 0x00d56f05 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
40 UIKit 0x01a103bd -[UIView(Hierarchy) _postMovedFromSuperview:] + 313
41 UIKit 0x01a1b4c1 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1847
42 UIKit 0x01a0e9b1 -[UIView(Hierarchy) addSubview:] + 56
43 UIKit 0x019a7892 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 2001
44 UIKit 0x01a153ef +[UIView(Animation) performWithoutAnimation:] + 82
45 UIKit 0x019a6c96 -[_UINavigationParallaxTransition animateTransition:] + 1155
46 UIKit 0x01ae1e4e -[UINavigationController _startCustomTransition:] + 3446
47 UIKit 0x01aee0c7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 688
48 UIKit 0x01aeecb9 -[UINavigationController __viewWillLayoutSubviews] + 57
49 UIKit 0x01c28181 -[UILayoutContainerView layoutSubviews] + 213
50 UIKit 0x01a1e267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
51 libobjc.A.dylib 0x02e8a81f -[NSObject performSelector:withObject:] + 70
52 QuartzCore 0x0177a2ea -[CALayer layoutSublayers] + 148
53 QuartzCore 0x0176e0d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
54 QuartzCore 0x0176df40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
55 QuartzCore 0x016d5ae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
56 QuartzCore 0x016d6e71 _ZN2CA11Transaction6commitEv + 393
57 QuartzCore 0x016d7544 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
58 CoreFoundation 0x030bd4ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
59 CoreFoundation 0x030bd41f __CFRunLoopDoObservers + 399
60 CoreFoundation 0x0309b344 __CFRunLoopRun + 1076
61 CoreFoundation 0x0309aac3 CFRunLoopRunSpecific + 467
62 CoreFoundation 0x0309a8db CFRunLoopRunInMode + 123
63 GraphicsServices 0x052299e2 GSEventRunModal + 192
64 GraphicsServices 0x05229809 GSEventRun + 104
65 UIKit 0x019b3d3b UIApplicationMain + 1225
66 Cirrus 0x0002daed main + 141
67 libdyld.dylib 0x03aed70d start + 1
68 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Will make IB integration simpler.
Kind of wired but seems that if there is only MBPickerView on the ViewController view it doesn't show up. After I add any other view then it start working as expected.
I don't know how to explain more, but this is what I observe trying to setup picker for the very first time on clean view controller view.
It seems IOS 7.1 broke the rounded corners for the contact cells when they are selected. Selected contact cells have hard square corners now.
I'd like to use this control to manage "tagging" in my application, but i dont know if its possible to allow "non-contacts" registries and how to allow registries that aren't in an array of "posibilites".
Btw very nice implementation! the best that i've seen.
I utilize three MBContactPickers (all share the same delegates) for a mail compose and there is currently no way to differentiate which contact picker caused the hideFilterContacts and updateViewHeightTo methods. That being said, for my own code I changed the following methods:
- (void)hideFilteredContacts;
- (void)updateViewHeightTo:(CGFloat)newHeight;
to
- (void)hideFilteredContactsForContactPicker:(MBContactPicker *)contactPicker;
- (void)updateViewHeightTo:(CGFloat)newHeigh forContactPicker:(MBContactPicker *)contactPicker;
Just wanted to see if there was a design choice to not pass the picker, since you did pass the contact picker for MBContactPickerDataSource. Let me know if you want the change I'll submit a pull request with the updated code/demo/readme.
Hi there, is it possible to keep the selected effect on the contacts for when you have an already populated list? And also, having different color states for those contacts.
Thanks!
This would probably involve centralizing all of our calculations so that when the prompt is hidden it's not used the calculate cell indexes.
The cleanest and most onerous solution would be to fix the flow layout so that sections do not force line breaks. If we did it this way, there would be no need for calculations and we could hard-code the prompt and entry cells to be the first index in their respective sections.
hi
im try use this in my project but im not able to set diferent prompt text color kinda dont know what else try :(
my project is in swift
I experienced a strange crash when the contact picker is deallocated when the parent view controller is destroyed, but only after rotating from landscape to portrait. I can reproduce the issue with the project example storyboard by creating a new initial view that pushes to the example VC. Rotate the device to landscape and back to portrait, pop the view and you get the following:
2014-03-13 22:20:57.143 MBContactPicker[14727:60b] *** Assertion failure in -[MBContactCollectionView dealloc], /SourceCache/UIKit_Sim/UIKit-2935.137/UICollectionView.m:654
Enabling zombie objects gives you a bit more information.
2014-03-13 22:23:28.671 MBContactPicker[14765:60b] *** -[MBContactCollectionViewFlowLayout respondsToSelector:]: message sent to deallocated instance 0x10925db80
Attempting to hold onto the layout object in a member variable results in the following giving a bit more information:
2014-03-13 22:27:25.632 MBContactPicker[14840:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UICollectionView (<MBContactCollectionView: 0x109857600; baseClass = UICollectionView; frame = (0 0; 320 31); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x109277bc0>; layer = <CALayer: 0x109273950>; contentOffset: {0, 0}> collection view layout: <MBContactCollectionViewFlowLayout: 0x109281390>) was deallocated while an update was in flight'
It appears some update to the layout is queued up after the dealloc is slated to run. A change that seemed to fix the problem and retain functionality is modifying the MBContactCollectionView forceRelayout function from:
[self performBatchUpdates:nil completion:nil];
to
MBContactCollectionViewFlowLayout *layout = MBContactCollectionViewFlowLayout*)self.collectionViewLayout;
[layout finalizeCollectionViewUpdates];
The whole entrytextcell disappears when typing long text in the textfield and moved to new line
Keeping a handle to the entry cell itself is π©. Keeping a pointer to just the current text value is good enough, we can apply that text whenever datasource is asked for the entry cell.
I know that there is an example of how to change the tint color in the read me, and that works fine if there is only one picker view in your layout, but we have a situation where we would like to use two, to pick different things, and each might be enabled or disabled, depending on user permissions, and we would like to give the user visual feedback before they tap on the picker as to whether it is enabled. Since changing the tint color is class-wide, rather than per instance of the picker, we cannot distinguish between them.
Would you consider having a way to set the tint on a per-Picker basis? Or even having the picker always use a gray tint when it is disabled?
The first time a letter is typed, the following warning is printed to the console:
Logging only once for UICollectionViewFlowLayout cache mismatched frame
UICollectionViewFlowLayout has cached frame mismatch for index path <NSIndexPath: 0xc000000000200016> {length = 2, path = 0 - 1} - cached value: {{54, 0}, {311, 31}}; expected value: {{59, 0}, {50, 31}}
This is likely occurring because the flow layout subclass MBContactCollectionViewFlowLayout is modifying attributes returned by UICollectionViewFlowLayout without copying them
Making a copy of the attributes returned by layoutAttributesForElementsInRect
and layoutAttributesForItemAtIndexPath
solves the problem.
I can see there's support for manually managing the frames but there isn't an example in the app doing this. It would be nice for newbies to be able to use it out of the box without having to figure out what needs to be done with the control when not using AutoLayout.
since 'filteredContacts' is private, user wouldn't know whether there are search results. There is always a tableview shown even when the filteredContacts count is 0.
With the ContactPicker embedded in a table cell, adding a contact whose name is too long to fit seems to almost work, but yields the following warning in the log:
2014-01-15 16:20:16.876 Cirrus[8237:70b] the behavior of the UICollectionViewFlowLayout is not defined because:
2014-01-15 16:20:16.876 Cirrus[8237:70b] the item width must be less that the width of the UICollectionView minus the section insets left and right values.
2014-01-15 16:20:16.876 Cirrus[8237:70b] Please check the values return by the delegate.
2014-01-15 16:20:17.181 Cirrus[8237:70b] Did Add: A list with an excessively long name
The attached image shows it seems a few pixels too wide; the rounded corners are cropped off, and the third dot of the ellipsis is just barely visible.
Hey!
I've been using this tool on some projects and it's been really helpful, thank you Cittrus!
I am relatively new to objective-c and iOS development but I'm learning on the go.
On my new personal project one of my goals was to design the whole app programatically.
I've been trying to add an MBContactPicker to a view programatically (using initWithFrame: ) with no success.
On the example provided I see that it is placed using a storyboard, which is what I would like to avoid if possible.
Is there a special way to use this nice tool with only code?
Thanks!
MBContactModel.h
produces two "Unknown type name 'UIImage'" errors, likely because UIKit isn't imported in the file. This breaks the build :(
If the view controller that contains the contact picker is pushed onto a navigation controllers stack the contact picker does not operate.
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.