2015-10-19 77 views

回答

1

第三方,如果你想在第三方使用MXSegmentedPager

本地

否则,如果你想在本土解决移动

,定制你的自我

  1. 创建一个共同的UIScrollView,如姓名tblScroll

  2. 的豆荚错误

    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); 
        } 
    
    } 
    

创建一个共同的UIView像名称viewSubBack

删除工作区和运行荚再次安装:

rm -rf MyProject.xcworkspace 
pod install 
+0

我使用MXSegmentedPager.how导入荚荚收到文件错误文件进入项目。 – Barani

+0

可以显示错误 –

+0

diff:/../Podfile.lock:没有这样的文件或目录 diff:/Manifest.lock:没有这样的文件或目录 错误:沙盒与Podfile.lock不同步。运行'pod install'或更新你的CocoaPods安装。 – Barani