HCPushSettingViewController

[复制链接]
来自: shengpeng0225 分类: iOS精品源码 上传时间: 2020-3-17 12:16:55
Tag:

项目介绍:

HCPushSettingViewController

language

Version

Platform

用于项目使用的方便的左侧或者右侧的弹出视图,自定义ViewController的逻辑独立

效果展示:

CocoaPods


pod 'HCPushSettingViewController'

问题处理

1. [!] Unable to find a specification for HCPushSettingViewController

调用pod repo update更新pod库

2. [!] CDN: trunk Repo update failed

podfile文件中指定source源为master 


source 'https://github.com/CocoaPods/Specs.git'

Requirements

 - iOS 8.0 or higher

 - ARC

 - Xcode 8.0 or higher

Usage

1. 创建一个视图(你需要显示的内容)


HCTestTableViewController *tablevc = [[HCTestTableViewController alloc] init];

2. 创建HCPushSettingViewController,并将其关联,然后使用present方法推出


HCPushSettingViewController *myvc = [HCPushSettingViewController settingControllerWithContentController:tablevc];

myvc.alignment = HCBaseSettingAlignmentLeft;

[self presentViewController:myvc animated:YES completion:nil];

3. 配置窗口大小以及各个参数


//设置视图方向 - 左侧显示

myvc.alignment = HCBaseSettingAlignmentLeft;

//内容大小为 300x500 MAXFLOAT表示铺满

myvc.hcContentSize = CGSizeMake(300, 500);

//设置边距缩进

myvc.contentInset = UIEdgeInsetsMake(10, 0, 10, 0);

//设置背景色

myvc.backgroundColor = [UIColor colorWithRed:26/255.f green:26/255.f blue:26/255.f alpha:0.5];

//打开跳转动画 - 不打开则界面直接显示

myvc.isTransitionAnimate = YES;

//点击背景隐藏手势启用

myvc.backgoundTapDismissEnable = YES

4. 更多查看头文件HCBaseSettingViewController.h


///Content view background Color

@property (nonatomic, strong) UIColor *hcContentViewBackgroundColor;

///hcContentView`s size, default is {300,MAXFLOAT},MAXFLOAT means will fill screen height

@property (nonatomic, assign) CGSize hcContentSize;

///Content EdgeInset ,Only Top and Bottom value is validate,left and right will be ignored. Default is UIEdgeInsetsZero

@property (nonatomic, assign) UIEdgeInsets contentInset;

///The final view postion,default is Right

@property (nonatomic, assign) HCBaseSettingAlignment alignment;

///Transition is animate,default is YES

@property (nonatomic, assign) BOOL isTransitionAnimate;

///If backgroundView not set,the value will effect backgroundView`s color

@property (nonatomic, strong) UIColor *backgroundColor;

///backgroundView

@property (nonatomic, strong) UIView *backgroundView;

///Tag backgoundView will cause ViewController dismiss

@property (nonatomic, assign) BOOL backgoundTapDismissEnable;

///dismiss controller completed block

@property (nonatomic, copy) void (^dismissComplete)(void);

Contact

如果请问题,请联系我,或者提交bug

相关源码推荐:

我来说两句
所有评论(7)
A7472 2020-3-20 11:43:11
好好 学习了 确实不错
回复
这是个逗比 2020-3-20 11:43:22
好好 学习了 确实不错
回复
inta加加 2020-3-20 11:43:55
感谢分享,code4app有你更精彩
回复
乱世佳人520 2020-3-20 11:44:11
好好 学习了 确实不错
回复
Rf2698 2020-3-20 11:45:07
感谢大神分享,必须顶!
回复
Yf8546 2020-3-20 11:45:16
感谢分享,楼主V5~
回复
xiao66guo 2020-3-20 13:03:23
很给力,Code4App有你更精彩!
回复
176 0 0
联系我们
首页/微信公众账号投稿

帖子代码编辑/版权问题

QQ:435399051,742864542

如何获得代码达人称号?

代码贡献英雄榜
用户名 下载数
通过邮件订阅最新 Code4App 信息
上一条 /4 下一条

广告投放| 广东互联网违法和不良信息举报中心|中国互联网举报中心|Github|申请友链|手机版|Code4App ( 粤ICP备15117877号-1 )