lucoceano / ckviewpager Goto Github PK
View Code? Open in Web Editor NEWDeprecated - You can easily create sliding tabs with CKViewPager.
License: MIT License
Deprecated - You can easily create sliding tabs with CKViewPager.
License: MIT License
how to set image instead of label,i tried this but not working.
(UIView *)viewPager:(ViewPagerController *)viewPager viewForTabAtIndex:(NSUInteger)index
{
// UILabel *label = [UILabel new];
// label.backgroundColor = [UIColor clearColor];
// label.font = [UIFont systemFontOfSize:12.0];
// label.text = [NSString stringWithFormat:@"karthi #%lu", (unsigned long)index];
// label.textAlignment = NSTextAlignmentCenter;
// label.textColor = [UIColor blackColor];
// [label sizeToFit];
UIImageView *img=[UIImageView new];
img.frame=CGRectMake(0, 0, 22, 22);
[img sizeToFit];
img.image=[UIImage imageNamed:[self.images objectAtIndex:index]];
[self.titlesLabels insertObject:img atIndex:index];
return img;
}
2015-10-30 23:29:33.975 Saba[2335:1157297] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: [views count] == 3'
*** First throw call stack:
(0x182bd0f5c 0x1977c3f80 0x182bd0e2c 0x183abff3c 0x1888faad8 0x1888fe304 0x1888f9de8 0x18812300c 0x187929f14 0x187924b20 0x1879249e0 0x18792407c 0x187923dd0 0x187976b00 0x183e5e018 0x182b728e0 0x182b88cdc 0x182b88414 0x182b8616c 0x182ab4dc0 0x18dc08088 0x18818ef60 0x100066930 0x197fee8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
Call stack does not give much information to me. I am pasting the call stack here.
Thread 1Queue : com.apple.main-thread (serial)
#0 0x000000019810b1e0 in __pthread_kill ()
#1 0x00000001981d4f0c in pthread_kill ()
#2 0x000000019807eb78 in abort ()
#3 0x0000000196e413f4 in abort_message ()
#4 0x0000000196e5de98 in default_terminate_handler() ()
#5 0x00000001977c4248 in _objc_terminate() ()
#6 0x0000000196e5af44 in std::__terminate(void ()()) ()
#7 0x0000000196e5a85c in __cxa_throw ()
#8 0x00000001977c4094 in objc_exception_throw ()
#9 0x0000000182bd0e2c in +NSException raise:format:arguments:
#10 0x0000000183abff3c in -NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:
#11 0x00000001888faad8 in -_UIQueuingScrollView _replaceViews:updatingContents:adjustContentInsets:animated:
#12 0x00000001888fe304 in -_UIQueuingScrollView _didScrollWithAnimation:force:
#13 0x00000001888f9de8 in -_UIQueuingScrollView layoutSubviews
#14 0x000000018812300c in -UIView(CALayerDelegate) layoutSublayersOfLayer:
#15 0x0000000187929f14 in -CALayer layoutSublayers
#16 0x0000000187924b20 in CA::Layer::layout_if_needed(CA::Transaction) ()
#17 0x00000001879249e0 in CA::Layer::layout_and_display_if_needed(CA::Transaction*) ()
#18 0x000000018792407c in CA::Context::commit_transaction(CA::Transaction*) ()
#19 0x0000000187923dd0 in CA::Transaction::commit() ()
#20 0x0000000187976b00 in CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) ()
#21 0x0000000183e5e018 in IODispatchCalloutFromCFMessage ()
#22 0x0000000182b728e0 in __CFMachPortPerform ()
#23 0x0000000182b88cdc in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION ()
#24 0x0000000182b88414 in __CFRunLoopDoSource1 ()
#25 0x0000000182b8616c in __CFRunLoopRun ()
#26 0x0000000182ab4dc0 in CFRunLoopRunSpecific ()
#27 0x000000018dc08088 in GSEventRunModal ()
#28 0x000000018818ef60 in UIApplicationMain ()
#29 0x0000000100066930 in main at /Users/snaqvi/Github/SabaApp/SabaApp/main.m:14
#30 0x0000000197fee8b8 in start ()
I trying to set the pager position and size, since I have other controls on the save view
How to set the last tab as the primary tab and launch at start
When you swipe page forward and backward quickly , the content page will not the right index page .
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.