xhzengAIB / XHTwitterPaggingViewer

A twitter like navigation bar, page viewer.
MIT License
223 stars 54 forks source link

How to push from other View ? #13

Open BhaveshDhaduk opened 9 years ago

BhaveshDhaduk commented 9 years ago

Hello,

In you demo you are using XHTwitterPaggingViewer from start of the application (First View Controller) and declare in didFinishLaunchingWithOptions.

As I am doing below hierarchy in StoryBoard. UINavigationController -> UIViewController -> UIViewController - > XHTwitterPaggingViewer

For this I am doing in ViewDidLoad of second VC

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];

XHTwitterPaggingViewer *twitterPaggingViewer = [storyboard instantiateViewControllerWithIdentifier:@"XHTwitterPaggingViewer"];

XHTableViewController *tableViewController1 = [storyboard instantiateViewControllerWithIdentifier:@"TableViewController1"];
XHTableViewController *tableViewController2 = [storyboard instantiateViewControllerWithIdentifier:@"TableViewController2"];

twitterPaggingViewer.viewControllers = @[tableViewController1, tableViewController2];

But i am getting crash

error

Please provide you feedback for this, how can I load from something inner view controller.

xhzengAIB commented 9 years ago

@googler2013 Hi! see this demo https://github.com/xhzengAIB/TwitterPaggingViewer/blob/master/Example/XHTwitterPaggingViewerStoryboradExample/XHTwitterPaggingViewerStoryboradExample/AppDelegate.m#L16

Hope can help you.

Jack