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

Show View Controllers instead of Colors #32

Open
mogsten opened this issue May 28, 2015 · 1 comment
Open

Show View Controllers instead of Colors #32

mogsten opened this issue May 28, 2015 · 1 comment

Comments

@mogsten
Copy link

mogsten commented May 28, 2015

How can I set this to show my view controllers instead of showing the UIColors

I was thinking that I would be able to do it in the views NSArray

NSArray *titles = @[[[UIImageView alloc] initWithImage:img1], [[UIImageView alloc] initWithImage:img2], [[UIImageView alloc] initWithImage:img3]];
NSArray *views = @[[self viewWithBackground:orange], [self viewWithBackground:[UIColor yellowColor]], [self viewWithBackground:gray]];

SLPagingViewController *pageViewController = [[SLPagingViewController alloc] initWithNavBarItems:titles
                                                                                navBarBackground:[UIColor whiteColor]
                                                                                           views:views
                                                                                 showPageControl:NO];
@MeseeryNileCode
Copy link

You can use either of these methods , in initialisation Phase:
-(id)initWithNavBarItems:(NSArray *)items navBarBackground:(UIColor *)background controllers:(NSArray *)controllers showPageControl:(BOOL)addPageControl;

or afterwards to add view controllers:
-(void)addViewControllers:(UIViewController *) controller needToRefresh:(BOOL) refresh;

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

No branches or pull requests

2 participants