hons82 / THSegmentedPager

Simple plugin-sample using the HMSegmentedControl and a UIPageViewController to show Tabs
Other
219 stars 52 forks source link

Hoow can I instantiate THSegmentedPager in UIViewController? #11

Closed afiq90 closed 9 years ago

afiq90 commented 9 years ago

How can I instantiate THSegmentedPager in Timeline.m(inherit from UIViewController) rather than AppDelegate.m?

What I mean is I wanna show THSegmentedPager when user open the Timeline View Controller instead of THSegmentedPager when load when user open the app. Thank you.

hons82 commented 9 years ago

I'm not really sure what you're asking about. The example APP is just an example... you could even add a button with a segue and let that point to the THSegmentedPager.

Instantiate it in a UIViewController is kind of a Problem, as the pager itself is a UIViewController

@interface THSegmentedPager : UIViewController<UIPageViewControllerDataSource,UIPageViewControllerDelegate>

so it would be a UIViewController in a UIViewController which makes only sense if you plan to push it on the Navigation stack or inside a ContainerView.

afiq90 commented 9 years ago

if i want to put in containerview, how can i do that? sorry i'm novice. hope you can help me. thank you. :)

hons82 commented 9 years ago

I'll create an example for that (but I don't know if I'll have time today) Do u use

afiq90 commented 9 years ago

sorry for late reply, I'm using storyboard and objective c. thank you.