转载自:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0731/3247.html
在开发中,我们常常需要ViewPager结合Fragment一起使用,如下图:
我们可以使用三方开源的PagerSlidingTabStrip去实现,或者viewpagerindicator,我一般都偏向前者。现在我们可以使用Design support library库的TabLayout去实现了。最终的效果图:[......]
转载自:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0731/3247.html
在开发中,我们常常需要ViewPager结合Fragment一起使用,如下图:
我们可以使用三方开源的PagerSlidingTabStrip去实现,或者viewpagerindicator,我一般都偏向前者。现在我们可以使用Design support library库的TabLayout去实现了。最终的效果图:[......]
A good starting point is 24sp for headlines and titles, 16sp for
subheadings, 14sp for body text, and 12sp for captions and fine print.
you can use a line spacing of 1.5 and add 2sp to each line[......]
The Material Design guidelines recommend picking a color from the
500 level as your primary, a color from the 700 or 800 level as your darker
primary, and a separate accent color.[......]
传统做法是在viewcontroller上设置navigationController的interactivePopGesturerecovnezer,但是bug很多,推荐如下,在nav controller上的做法:
class C4MVTNavigationController: UINavigationController {
// MARK: - Property
override var supportedInterfaceOrientations: UIIn[......]
传送门:http://stackoverflow.com/questions/6325457/getting-the-frame-of-a-particular-tab-bar-item
我稍微改了一下:
- (CGRect)frameForTabInTabBarWithIndex:(NSUInteger)index
{
NSMutableArray *tabBarItems = [NSMutableArray arrayWithCapacity:[self.tabBar.i[......]