iOS开发好文技术重塑首页投稿(暂停使用,暂停投稿)

iOS 类似淘宝购物车翻页

2016-07-07  本文已影响579人  孤独的剑客

[下载地址]https://git.oschina.net/mrj_mrj/pagesFilp.git

实现原理:

用一个UIScrollow 作为最底下的试图,上面加载两个可以滚动的试图,比如UITableView,UIScrollow,UIWebView,这里用的是UITableView和UIWebView.

效果图:

未命名.gif

关键代码部分:

<p>UIScrollView</p><pre><code>

}

</code></pre>

<p>UITableView</p><pre><code>

}
</code></pre>

<p>UIWebView</p><pre><code>

}

</code></pre>

<p>滑动效果</p><pre><code>

self.topTableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
    [UIView animateWithDuration:1 animations:^{
        self.baseScrollow.contentOffset = CGPointMake(0, _screenHeight);
    } completion:^(BOOL finished) {
        [self.topTableView.mj_footer endRefreshing];
    }];
}];

self.webView.scrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
    [UIView animateWithDuration:1 animations:^{
        self.baseScrollow.contentOffset = CGPointMake(0, 0);
    } completion:^(BOOL finished) {
        [self.webView.scrollView.mj_header endRefreshing];
    }];
}];

}
</code></pre>

上一篇 下一篇

猜你喜欢

热点阅读