专栏名称: Cocoa开发者社区
CocoaChina苹果开发中文社区官方微信,提供教程资源、app推广营销、招聘、外包及培训信息、各类沙龙交流活动以及更多开发者服务。
目录
相关文章推荐
今天看啥  ›  专栏  ›  Cocoa开发者社区

iOS-仿QQ侧边栏

Cocoa开发者社区  · 公众号  · ios  · 2016-08-12 08:03
▲点击上方“CocoaChina”关注即可免费学习 iOS 开发作者:leiliang原文链接:http://www.jianshu.com/p/8b1d86d694cf侧边栏是现在app中很常用的一种UI展示方式,这里我封装了QQ的侧边栏进行了一下较为简单的封装,使用起来很简单,接入方式如下:// tabBarControllerPSTabBarController *tabBarVC = [[PSTabBarController alloc] init];// 左侧视图LeftView *leftView = [[LeftView alloc] initWithFrame:CGRectMake(-self.window.width * (1 - kLeftWidthScale), 0, self.window.width, self.window.height)];// 接入侧边栏[[PSDrawerManager instance] installCenterViewController:tabBarVC leftView:leftView];如果你想要像QQ中一样,只有在tabBar选中某一项的时候才能够展示侧边栏,那么你可以像这样调用:#pragma mark -#pragma mark - UITabBarController protocol methods- (void)tabBarController:(UITabBarController *)tabBarController d ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照