Git Product home page Git Product logo

Comments (8)

aout avatar aout commented on September 26, 2024

Any updates on this issue?

from mbcontactpicker.

mhupman avatar mhupman commented on September 26, 2024

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.

kyosold avatar kyosold commented on September 26, 2024

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.

ChrisMcEwan avatar ChrisMcEwan commented on September 26, 2024

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.

overlay_issue

from mbcontactpicker.

ChrisMcEwan avatar ChrisMcEwan commented on September 26, 2024

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.

ChrisMcEwan avatar ChrisMcEwan commented on September 26, 2024

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.

 avatar commented on September 26, 2024

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.

 avatar commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.