[转]Android Design Library提供的TabLayout的用法

转载自:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0731/3247.html

在开发中,我们常常需要ViewPager结合Fragment一起使用,如下图:

1

我们可以使用三方开源的PagerSlidingTabStrip去实现,或者viewpagerindicator,我一般都偏向前者。现在我们可以使用Design support library库的TabLayout去实现了。最终的效果图:[......]

继续阅读

iOS如何支持手势返回

传统做法是在viewcontroller上设置navigationController的interactivePopGesturerecovnezer,但是bug很多,推荐如下,在nav controller上的做法:
class C4MVTNavigationController: UINavigationController {

// MARK: - Property
override var supportedInterfaceOrientations: UIIn[......]

继续阅读