Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UITableViewController only #14

Closed
kutakmir opened this issue Jul 23, 2014 · 5 comments · Fixed by #15
Closed

UITableViewController only #14

kutakmir opened this issue Jul 23, 2014 · 5 comments · Fixed by #15

Comments

@kutakmir
Copy link

Is there a way how to use also UIViewController with embedded UITableView or UIScrollView the same way as UITableViewController?
The header responds only to this class so far..

@kutakmir
Copy link
Author

I'd suggest to replace viewController.view with this function:

- (UIScrollView *)scrollViewFromHierarchyOfViewController: (UIViewController *)controller
{
    // Get selected scroll view.
    UIScrollView *scrollView = (id)controller.view;
    if (![scrollView isKindOfClass:[UIScrollView class]]) {
        for (UIView *subview in [self selectedViewController].view.subviews) {
            if ([subview isKindOfClass:[UIScrollView class]]) {
                scrollView = (id)subview;
                break;
            }
        }
    }

    return scrollView;
}

@kutakmir
Copy link
Author

or even better by providing a view for each controller, so that for example UINavigationController can be embedded and therefore Instagram gallery picker effect can be achieved!

That would make the library even cooler!!

@akiroom
Copy link
Owner

akiroom commented Jul 31, 2014

Thank you for your advice.
Now, I implemented AXStretchableSubViewControllerViewSource protocol, from version 0.9.0.
You can represent which view is UIScrollView by this protocol.
Please check AXSub4ViewController.h and AXSub4ViewController.m in example.

@kutakmir
Copy link
Author

kutakmir commented Aug 2, 2014

works like a charm! Great work!

@akiroom
Copy link
Owner

akiroom commented Aug 3, 2014

Thank you for your nice comment!

@akiroom akiroom closed this as completed Aug 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants