DLSlideView
DLSlideView copied to clipboard
基本上十个便签就会出现问题了
第十个标签滑动不出来
item的间隔独立出来了吗
`#pragma mark ============== item width
-
(void)layoutTabbar{
float width = self.bounds.size.width/self.tabbarItems.count; float height = self.bounds.size.height; float x = 0.0f; for (NSInteger i=0; i<self.tabbarItems.count; i++) { x = i*width; UILabel *label = (UILabel *)[scrollView_ viewWithTag:kLabelTagBase+i]; UIImageView *imageView = (UIImageView *)[scrollView_ viewWithTag:kImageTagBase+i]; UIImageView *selectedIamgeView = (UIImageView *)[scrollView_ viewWithTag:kSelectedImageTagBase+i]; label.frame = CGRectMake(x + (width-label.bounds.size.width-CGRectGetWidth(imageView.bounds))/2.0f, (height-label.bounds.size.height)/2.0f, CGRectGetWidth(label.bounds), CGRectGetHeight(label.bounds)); imageView.frame = CGRectMake(label.frame.origin.x + label.bounds.size.width+kImageSpacingX, (height-imageView.bounds.size.height)/2.0, CGRectGetWidth(imageView.bounds), CGRectGetHeight(imageView.bounds)); selectedIamgeView.frame = imageView.frame; }
float trackX = width*self.selectedIndex; trackView_.frame = CGRectMake(trackX, trackView_.frame.origin.y, width, kTrackViewHeight); } ` 应该是这段code布局item.width?
更差了
item width有配置项的,用1.0版吧