guilhermearaujo / guitabpagerviewcontroller Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
When we rotate the screen the tab indexing is lost.
i have used ViewForTitle
datasource method .
but i only last View is Visible ,,,i this all views are being added on one on another so the are hiding
i tried incrememting X position according to the Index number but not able to do that
when i implement TitleForIndex
is works fine .please help ,me out
Hey there,
I couldn't get this to work with Swift, even with a bridging header. Keeps saying the classes aren't found. Has anyone gotten this to work in a Swift project?
Thanks
Hi !
What about setting the currentIndex property to public in order to know which tab controller is actually displayed ? :)
BTW, thx for your work !
Best,
Add possibility to show tabs at bottom of the screen
Hello,
I am using this cocoa pod and able to use it properly. However, I want to disable tab bar indicator. I know how to disable tab bar indicator if I inherit directly from Scroll View since it has necessary methods, but I inherit from GUITabPagerViewController in my view controller and there isn't any method associated with that. Thus, I came up with an idea of inheriting from GUITabPagerViewController and GUITabScrollView both, however Objective C does not allow multiple inheritance.
Is there an idea how I can achieve this?
Please provide access to the tab color not only to the line under the tab.
I am adding TableView in each Tab , so when i scroll up and Down on UITableView the Tab changes from one Tab to another .
Please help me out ?
Thanks in advance !
my code create view
(UIView *)viewForTabAtIndex:(NSInteger)index {
UIView *view=[[UIView alloc]init];
//view.backgroundColor=[UIColor orangeColor];
UIImageView *img=[UIImageView new];
view.frame=CGRectMake(10, 13, 60, self.tabHeight);
img.frame=CGRectMake(20, 15, 22, 22);
img.image=[UIImage imageNamed:[self.images objectAtIndex:index]];
[view addSubview:img];
return view;
}
i want to change images when i select tab..is there method for that?
Sometimes if you swipe quickly between the tabs the tab index shows to the wrong tab
Can you please provide a Swift 3 version for this library?
Hey,
There's an issue with the constraints as far as I can tell. Here's the error message:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse constraint format: Expected a view H:|-165.000000-|
Any help would be awesome! Thanks :D
Wrong header tab indicator line frame when -numberOfViewControllers return a small number
Hi,
I have a collectoin view and when i click on one item i need to open another view controller with GUITabPagerViewController and show corresponding tab. At this moment always it opens first tab.
Is there any solution for this?
I need to disable/enable the ability to change the tab when a action is called in the pageview. I have no idea how i could access the pageviewcontroller before the swipe gestures is called.
I tried it with additional delegate methods in the guitabpagerviewcontroller and i also tried to access directly from my main controller to set pageViewControllerObject.view.userInteractionEnabled = NO; It is not possible because the pageviewcontroller is a child of UIPageViewControllerContentView.
So i become a warning: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIPageViewControllerContentView childViewControllers]: unrecognized selector sent to instance.
Hi,
if you run this project on XCode7 you get this crash:
2015-09-02 10:11:35.442 GUITabPagerViewController[42606:821468] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A constraint cannot be made between a leading/trailing attribute and a right/left attribute. Use leading/trailing for both or neither.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000108f7e9b5 exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001089f6deb objc_exception_throw + 48
2 CoreFoundation 0x0000000108f7e8ed +[NSException raise:format:] + 205
3 Foundation 0x00000001085bff02 +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:] + 299
4 GUITabPagerViewController 0x00000001084ea331 -[GUITabScrollView initWithFrame:tabViews:tabBarHeight:tabColor:backgroundColor:] + 4705
5 GUITabPagerViewController 0x00000001084e9010 -[GUITabScrollView initWithFrame:tabViews:tabBarHeight:tabColor:backgroundColor:selectedTabIndex:] + 240
6 GUITabPagerViewController 0x00000001084e7eec -[GUITabPagerViewController reloadTabs] + 3596
7 GUITabPagerViewController 0x00000001084e6e1d -[GUITabPagerViewController reloadData] + 909
8 GUITabPagerViewController 0x00000001084e87e8 -[ViewController viewWillAppear:] + 88
9 UIKit 0x00000001094b87b6 -[UIViewController _setViewAppearState:isAnimating:] + 710
10 UIKit 0x00000001094b8e50 -[UIViewController __viewWillAppear:] + 149
11 UIKit 0x00000001094f43f2 -[UINavigationController _startTransition:fromViewController:toViewController:] + 771
12 UIKit 0x00000001094f53a9 -[UINavigationController _startDeferredTransitionIfNeeded:] + 890
13 UIKit 0x00000001094f61ad -[UINavigationController __viewWillLayoutSubviews] + 57
14 UIKit 0x00000001096882d1 -[UILayoutContainerView layoutSubviews] + 248
15 UIKit 0x00000001093d9a3b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
16 QuartzCore 0x000000010cd9236a -[CALayer layoutSublayers] + 146
17 QuartzCore 0x000000010cd86bd0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
18 QuartzCore 0x000000010cd86a4e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
19 QuartzCore 0x000000010cd7b1d5 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
20 QuartzCore 0x000000010cda89f0 _ZN2CA11Transaction6commitEv + 508
21 QuartzCore 0x000000010cda9154 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
22 CoreFoundation 0x0000000108eaa457 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
23 CoreFoundation 0x0000000108eaa3c7 __CFRunLoopDoObservers + 391
24 CoreFoundation 0x0000000108e9f93c CFRunLoopRunSpecific + 524
25 UIKit 0x0000000109327d2d -[UIApplication _run] + 402
26 UIKit 0x000000010932c99e UIApplicationMain + 171
27 GUITabPagerViewController 0x00000001084e8eef main + 111
28 libdyld.dylib 0x000000010b58992d start + 1
29 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
NSLayoutAttributeLeading
to NSLayoutAttributeLeft
seems works...
[self setTabIndicatorDisplacement:[NSLayoutConstraint constraintWithItem:tabIndicator
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0f
constant:widthDifference / 2 + 5]];
Hi ,
Firstly i would like to thank you for providing this SDK . It is very userfriendly . But i would like to know how to give the equal spacing between three tabs. I have a scenario where i have three tabs (like Tab 1 , Tab2 , Tab 3). Actually in your SDK tabs are starting from Middle . Could you say me the appropriate method to give equal spacing . It would be helpful in my project .
Thank you ,
Waiting for your reply
I only have 2 tabs, but they are the center position, how can I set them start from left ?
[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A constraint cannot be made between a leading/trailing attribute and a right/left attribute. Use leading/trailing for both or neither.
The base class GUITabPagerViewController UIViewController does not forwards UIViewController display events:
-(void)viewDidAppear:(BOOL)animated;
-(void)viewDidDisappear:(BOOL)animated;
etc.
I want to set all tabs left alignment initially.
can you help me ??
It can be reproduced when you rotate on ipad. iOS 8 has worse situation than iOS 9 and 10.
Hi, How to set the text color when selected?
Perhaps it was caused by this sentence in GUITabScrollView.m :
[contentView setTranslatesAutoresizingMaskIntoConstraints:NO].
it fixed after i delete it.
And the header view doesn't show well when rotation changed.
sorry for my poor english
I want to have different font for each tab title. How can this be done?
please make idea. ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.