Closed mluu510 closed 9 years ago
@mluu510 That's a great question. I think in order to get this to work with Auto Layout, I'll have to do some refactoring; namely, I'd like to make _direction
a derived property instead of one set during initialization. That, and I'd like to make some none-frame-based initializers. If you happen to get the chance to open a Pull Request, please do so! It may be a few days until I can get to this (perhaps by this weekend).
Look forward to seeing the update. Thanks, Ben!
Not sure if the problem is solved already, but latest BDKCollectionIndexView works fine with AutoLayout visual format language for me.
I use it like this:
// iv stands for BDKCollectionIndexView object
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[iv]-0-[bottomBar]" options:0 metrics:nil views:NSDictionaryOfVariableBindings(iv, bottomBar)]];
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[iv(w)]-0-|" options:0 metrics:@{@"w" : @30.0f} views:NSDictionaryOfVariableBindings(iv)]];
I was able to successfully connect BDKCollectionIndexView via a storyboard IBOutlet and fully constrain it there. I did create a separate "setup" on BDKCollectionIndexView method to handle the other settings in lieu of using "indexViewWithFrame".
I was able to use this view with auto layout just fine today; closing this issue. Let me know if you're still having issues.
How do I use this indexView with Auto Layout? I don't want to set the frame when I alloc & init it, so the panning feature doesn't work when I do this. How do I overcome this problem? Thank you.