【发布时间】:2016-01-17 09:55:24
【问题描述】:
【问题讨论】:
标签: ios objective-c scrollbar tabbar
【问题讨论】:
标签: ios objective-c scrollbar tabbar
第三方
如果您想继续使用第三方,请使用 MXSegmentedPager
原生
如果您想在 Native 中工作,请自定义您的自我
创建一个共同的UIScrollView,如名称tblScroll
创建一个常见的UIView,例如名称viewSubBack'
关于UISCrollViewDelegate 方法
// this is the line for calculate the deviceWidth
#define KAPPDeviceWidth [[UIScreen mainScreen] bounds].size.width
- (void)scrollViewDidScroll:(UIScrollView *)sender
{
if (self.tblScroll.contentOffset.x<KAPPDeviceWidth/2)
{
self.viewSubBack.frame=CGRectMake(self.tblScroll.contentOffset.x, 106, 160, 5); // the view changes related to your x - coordinates change
}
else
{
self.viewSubBack.frame=CGRectMake((KAPPDeviceWidth/2)+1, 106, 160, 5);
}
}
针对 Pod 错误
删除工作区并再次运行 pod install:
rm -rf MyProject.xcworkspace
pod install
【讨论】: