Comments (8)
Any updates on this issue?
from mbcontactpicker.
I'm unable to reproduce this issue. I placed 3 MBContactPickers on a storyboard scene and ran it in both 7.0 and 7.1 simulator. I was able to tap on all 3 and they became first responder. Can you further describe your setup or upload a demo project?
from mbcontactpicker.
I'm is ios 7.1, it show contacts list but i can't click it, i use it in UITableViewCell and i can see the contact list but i click it is the other UITableViewCell, it seems like isn't top,i'm use xib, code:
// ---------- MBContactPicker DataSource & Delegate --------------
-
(void)initContactPickerView
{
AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate];self.allFriendsArray = [self.myCommon getFriendsInfoWithAccount:app.sessionAccount WithType:0];
NSMutableArray *contacts = [[NSMutableArray alloc] initWithCapacity:self.allFriendsArray.count];
for (NSMutableDictionary *friendItem in self.allFriendsArray) {
MBContactModel *model = [[MBContactModel alloc] init];
model.contactTitle = [friendItem objectForKey:@"displayName"];
model.contactSubtitle = [friendItem objectForKey:@"mailbox"];
[contacts addObject:model];
}
self.contacts = contacts;self.contactPickerView.delegate = self;
self.contactPickerView.datasource = self;self.contactPickerView.prompt = @"";
} -
(NSArray *)contactModelsForContactPicker:(MBContactPicker *)contactPickerView
{
return self.contacts;
} -
(NSArray *)selectedContactModelsForContactPicker:(MBContactPicker *)contactPickerView
{
return self.selectedContacts;
} -
(void)contactCollectionView:(MBContactCollectionView*)contactCollectionView didSelectContact:(id)model
{
NSLog(@"Did Select: %@", model.contactTitle);
} -
(void)contactCollectionView:(MBContactCollectionView*)contactCollectionView didAddContact:(id)model
{
NSLog(@"Did Add: %@", model.contactTitle);
} -
(void)contactCollectionView:(MBContactCollectionView*)contactCollectionView didRemoveContact:(id)model
{
NSLog(@"Did Remove: %@", model.contactTitle);
}
// This delegate method is called to allow the parent view to increase the size of
// the contact picker view to show the search table view
- (void)didShowFilteredContactsForContactPicker:(MBContactPicker*)contactPicker
{
if (self.contactPickerViewHeightConstraint.constant <= contactPicker.currentContentHeight)
{
[UIView animateWithDuration:contactPicker.animationSpeed animations:^{
CGRect pickerRectInWindow = [self.view convertRect:contactPicker.frame fromView:nil];
CGFloat newHeight = self.view.window.bounds.size.height - pickerRectInWindow.origin.y - contactPicker.keyboardHeight;
self.contactPickerViewHeightConstraint.constant = newHeight;
[self.view layoutIfNeeded];
}];
}
}
// This delegate method is called to allow the parent view to decrease the size of
// the contact picker view to hide the search table view
- (void)didHideFilteredContactsForContactPicker:(MBContactPicker*)contactPicker
{
if (self.contactPickerViewHeightConstraint.constant > contactPicker.currentContentHeight)
{
[UIView animateWithDuration:contactPicker.animationSpeed animations:^{
self.contactPickerViewHeightConstraint.constant = contactPicker.currentContentHeight;
[self.view layoutIfNeeded];
}];
}
}
// This delegate method is invoked to allow the parent to increase the size of the
// collectionview that shows which contacts have been selected. To increase or decrease
// the number of rows visible, change the maxVisibleRows property of the MBContactPicker
- (void)contactPicker:(MBContactPicker*)contactPicker didUpdateContentHeightTo:(CGFloat)newHeight
{
self.contactPickerViewHeightConstraint.constant = newHeight;
[UIView animateWithDuration:contactPicker.animationSpeed animations:^{
[self.view layoutIfNeeded];
}];
}
from mbcontactpicker.
Same issue, IOS 7.1 simulator (and on real device) with two contact pickers, contactpicker1is on top (higher up the view hierarchy) and works when clicked, but the selection list is behind contactpicker2.
contactpicker2 does not respond to clicks at all. Both pickers are just placed on a UIView. Excuse the random colours it is only to show up the
layout issues. Thanks.
from mbcontactpicker.
I managed to get the drop list to sit on top now, but still struggling to get the second picker to respond.. some code on how I initialise them, which works in iOS 7 but not 7.1 or above. Anybody able to advise on what is wrong ?
// Contact Picker View CC
self.contactPickerViewCC.delegate = self;
self.contactPickerViewCC.datasource = self;
self.contactPickerViewCC.translatesAutoresizingMaskIntoConstraints = true;
self.contactPickerViewCC.prompt = @"CC:";
// Contact Picker View TO
self.contactPickerViewTO.delegate = self;
self.contactPickerViewTO.datasource = self;
self.contactPickerViewTO.translatesAutoresizingMaskIntoConstraints = true;
self.contactPickerViewTO.prompt = @"To:";
from mbcontactpicker.
I've edited the sample to show the problem. Still working on this myself but not having much luck. Anybody able to assist ?
http://www43.zippyshare.com/v/63383352/file.html
from mbcontactpicker.
I'm having this issue on iOS 8. Any updates? I have three contact pickers (to/cc/bcc) and just the first one responds to clicks. I was able to change using becomeFirstResponder() and write something, but the cursor doesn't appear.
from mbcontactpicker.
I fixed this issue removing the contact pickers from the storyboard and including programmatically (w/ Masonry) as subview of the root view (viewcontroller.view).
If I include the contact picker inside other view, it doesn't work.
from mbcontactpicker.
Related Issues (20)
- should let user to choose their preferred keyboard type
- shouldn't show searchtableview when there are no filtered contacts HOT 1
- entrytextcell disappears when typing long text in the textfield and moved to new line HOT 1
- Doesnt play nice when contained in a UINavigationController HOT 1
- Adding MBContactPicker to view programatically HOT 2
- How do filter on the "contactTitle" and also "contactSubtitle" HOT 1
- Adding MBContactPicker to tableviewcell HOT 1
- Selected Contacts
- TextField placeholder text is not showing
- iOS8 - Rotation Causes Wrong Offset in Picker
- iOS 8 Support HOT 1
- MBContactPicker should implement UITextInput protocol
- "Unknown type name UIImage" in xcode 6 when implementing model HOT 4
- didEnterCustomText delegate method never called. HOT 1
- Delegate method badly named and not present in protocol HOT 2
- set Propmpt text color
- Fails to compile with Xcode 7.1 HOT 1
- a
- UICollectionViewFlowLayout warning HOT 1
- Unknown type name 'UIImage'
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 mbcontactpicker.