Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Load every tabs at once #34

Closed
ValentinDenis opened this issue Aug 25, 2015 · 9 comments
Closed

Load every tabs at once #34

ValentinDenis opened this issue Aug 25, 2015 · 9 comments

Comments

@ValentinDenis
Copy link

Hi, I'd like to know if it's possible to load every tabs once, to navigate flawlessly between them (and not one by one when you switch them).
Thanks

@ValentinDenis ValentinDenis changed the title Load every tabs once Load every tabs at once Aug 25, 2015
@ermalkaleci
Copy link
Owner

Hi @ValentinDenis

Yes it's possible.
If you call setCurrentTabIndex methods foreach tabs and then call again setCurrentTabIndex with index 0 or whatever.

lets say:

for (int i = 1; i < numberOfTabs; i++)
    [tabSwipe setCurrentTabIndex:i];
[tabSwipe setCurrentTabIndex:0];

Thanks

@ValentinDenis
Copy link
Author

Works perfectly, thanks !

@ZoeVale
Copy link

ZoeVale commented Sep 20, 2015

Hi, excuse me but the solution
for (int i = 1; i < numberOfTabs; i++)
[tabSwipe setCurrentTabIndex:i];
[tabSwipe setCurrentTabIndex:0];
don't works .
Can you help me please ? It's don't call TabIndex with index 0 but remains in TabIndex 2 (i Hanve e tab 0,1, 2 )
thank's in advance.

@ermalkaleci
Copy link
Owner

Hi @ZoeVale,
Ensure your are calling [tabSwipe setCurrentTabIndex:0]; outside the loop

@ZoeVale
Copy link

ZoeVale commented Sep 20, 2015

Hi, yes.
thi is my code:

I created a method "careateTabSwipes" that i call in my viewDidLoad

  • (void) createTabSwipes {
    //tabSwipe
    _names = @[@"EVENTI", @"COUPON", @"STRUTTURE"];

    tabSwipe = [[CarbonTabSwipeNavigation alloc] createWithRootViewController:self
    tabNames:_names
    tintColor:[UIColor wadagoBlack]
    delegate:self];

    [ tabSwipe setSelectedColor:[UIColor whiteColor]
    andIndicatorColor:[UIColor wadagoGreen]
    font:[UIFont boldSystemFontOfSize:14]];

    [tabSwipe setIndicatorHeight:4.f];
    [tabSwipe addShadow];

    for (int i = 1; i < 3; i++)
    [tabSwipe setCurrentTabIndex:i];

[tabSwipe setCurrentTabIndex:0];

}

@ermalkaleci
Copy link
Owner

Confirmed!
The last commit was for animation when click the tab. This cause the bug.
Do not use latest code. Use CocoaPods version

@ZoeVale
Copy link

ZoeVale commented Sep 20, 2015

Thank you man.
I have some problem to use CocoaPods can you tell me which version i can use please?

@ermalkaleci
Copy link
Owner

@ZoeVale
Copy link

ZoeVale commented Sep 20, 2015

I'm going to use this version tomorrow.
Thank you very much. ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants