工单相关功能设置

KFRequests.h

注:用于创建工单视图控制器

属性说明

属性名称类型说明
isShowDetailMessageBOOL工单内容控制器是否显示详细信息按钮

方法说明

1、 初始化方法
+ (instancetype) instance;
2、 push创建工单视图控制器
+ (void) showRequestCreationWithNavController:(UINavigationController*)navController;
参数名称类型是否必填说明
navControllerUINavigationController是用于push创建工单视图控制器
3、 push创建工单视图控制器
+ (void) showRequestCreationWithNavController:(UINavigationController*)navController 
withSuccess:(KFAPISuccess)success andError:(KFAPIError)error;
参数名称类型是否必填说明
navControllerUINavigationController是用于push创建工单视图控制器
successKFAPISuccess否网络请求成功时返回
errorKFAPIError否网络请求失败时返回
4、 push创建工单视图控制器(可添加自定义字段)
+ (void) presentRequestCreationWithNavController:(UINavigationController *)navController 
fieldDict:(NSDictionary *)fieldDict success:(KFAPISuccess)success andError:(KFAPIError)error;
参数名称类型是否必填说明
navControllerUINavigationController是用于push创建工单视图控制器
fieldDictNSDictionary否工单自定义字段字典,如@{@"field_123":@"内容"}
successKFAPISuccess否网络请求成功时返回
errorKFAPIError否网络请求失败时返回
5、 push工单列表视图控制器
+ (void) showRequestListWithNavController:(UINavigationController *)navController;
参数名称类型是否必填说明
navControllerUINavigationController是用于push工单列表视图控制器
6、 push工单列表视图控制器(带actionBlock)
+ (void)showRequestListWithNavController:(UINavigationController *)navController    
rightBarButtonActionBlock:(KFBarButtonActionBlock)actionBlock;
参数名称类型是否必填说明
navControllerUINavigationController是用于push工单列表视图控制器
actionBlockKFBarButtonActionBlock否点击工单列表navBar右侧按钮的事件处理,为NULL直接跳转
到创建工单控制器(不带工单自定义参数)
7、 present工单列表视图控制器
+ (void) presentRequestListWithNavController:(UINavigationController *)navController;
参数名称类型是否必填说明
navControllerUINavigationController是用于present工单列表视图控制器
8、present工单列表视图控制器(带actionBlock)
+ (void) presentRequestListWithNavController:(UINavigationController *)navController 
rightBarButtonActionBlock:(KFBarButtonActionBlock)actionBlock;
参数名称类型是否必填说明
navControllerUINavigationController是用于present工单列表视图控制器
actionBlockKFBarButtonActionBlock否点击工单列表navBar右侧按钮的事件处理,为NULL直接跳转
到创建工单控制器(不带工单自定义参数)
9、 设置newRequest右侧navBarButton的图片名称
+ (void) setNewRequestBarButtonImage:(NSString *)name;
参数名称类型是否必填说明
nameNSString是设置图片名称
10、 设置newRequest右侧navBarButton的内容
+ (void) setNewRequestBarButtonTitle:(NSString *)title;
参数名称类型是否必填说明
titleNSString是设置navBarButton的内容
11、 设置newRequest右侧navBarButton的显示方式
+ (void) setNavBarCreateRequestUIType:(KFNavBarCreateRequestUIType)type;
参数名称类型是否必填说明
typeKFNavBarCreateRequestUIType是设置navBarButton的显示方式
12、设置详细工单右侧的navBarButton的图片名称
+ (void) setDetailMessageBarButtonImage:(NSString *)name;
参数名称类型是否必填说明
nameNSString是设置图片名称
13、设置详细工单右侧的navBarButton的内容
+ (void) setDetailMessageBarButtonTitle:(NSString *)title;
参数名称类型是否必填说明
titleNSString是设置navBarButton的内容
14、设置详细工单右侧的navBarButton的显示方式
+ (void) setNavBarDetailMessageUIType:(KFNavBarDetailMessageUIType)type;
参数名称类型是否必填说明
typeKFNavBarDetailMessageUIType是设置navBarButton的显示方式

创建工单视图UI设置

KFCreateRequestView.h

注:设置创建工单视图UI

属性说明

属性名称类型是否必填说明
placeholderTextColorUIColor否placeholder的颜色
placeholderTextNSString否placeholder的内容
textViewColorUIColor否textView的颜色
textViewBackgroundColorUIColor否textView的背景颜色
textViewFontUIFont否textView的字体
viewBackgroundColorUIColor否view的背景颜色
attachmentButtonImageUIImage否AttachmentButton的图片
textViewHeightCGFolat否textView的高度

使用说明:KFCreateRequestView遵守UIAppearance协议,设置创建工单视图UI,需使用设置外观方式设置。

如:设置textView的字体

[[KFCreateRequestView appearance]setTextViewFont:[UIFont systemFontOfSize:18.f]];

注:以后出现的View,均遵守UIAppearance协议,可以用appearance修改界面样式

反馈工单列表UI设置

KFTicketListView.h

注:设置反馈列表视图UI

属性说明

属性名称类型是否必填说明
cellcontentFontUIFont否cell contentLabel的字体
cellcontentColorUIColor否cell contentLabel的颜色
cellTimeFontUIFont否cell timeLabel的字体
cellTimeColorUIColor否cell timeLabel的颜色
cellStatusFontUIFont否cell statusLabel的字体
cellStatusColorUIColor否cell statusLabel的颜色
isHiddenStatusLabelBOOL否是否隐藏statusLabel,默认不隐藏
tableBackgroundColorUIColor否tableView的背景颜色
separatorColorUIColor否tableView seperator的颜色
noResultsLabelFontUIFont否 noResultsLabel的字体
noResultsLabelColorUIColor否noResultsLabel的颜色
noResultsLabelTextNSString否noResultsLabel的颜色
noResultsLabelBackgroundColorUIColor否noResultsLabel的背景颜色

使用说明:设置相关UI方式同KFCreateRequestView.h。

工单内容视图UI设置

KFRequestCommentTableCell.h

注:设置工单内容cell的UI

属性说明

属性名称类型是否必填说明
headImageViewUIImageView无 头像
timeLabelUILabel无时间
nameLabelUILabel无角色
ctnTextViewUITextView无内容
headerImageUIImage无头像
avatarUIImage否avatar的image
avatarSpaceNSNumber否附件之间的间距
nameLabelFontUIFont否nameLabel的字体
nameLabelColorUIColor否nameLabel的颜色
contentFontUIFont否contentLabel的字体
contentColorUIColor否contentLabel的颜色
timeLabelFontUIFont否timeLabel的字体
timeLabelColorUIColor否timeLabel的颜色
cellBackgroundColorUIColor否cell的背景颜色

使用说明:KFAgentCommentTableCell和 KFEndUserCommentTableCell是KFRequestCommentTableCell的子类, 单独设置客服或用户的cell使用KFAgentCommentTableCell和 KFEndUserCommentTableCell,设置统一样式则可使KFRequestCommentTableCell。 设置相关UI方式同KFCreateRequestView.h。

工单详细信息视图UI设置

KFDetailMessageTableViewCell.h

注:设置工单详细信息cell的相关UI

属性说明

属性名称类型是否必填说明
titleLabel UILabel 无 标题
contentLabel UILabel 无 内容
titleFont UIFont 否 titleLabel的字体
titleColor UIColor 否 titleLabel的颜色
contentFont UIFont 否 titleLabel的颜色
contentColor UIColor 否 titleLabel的颜色
cellBackgroundColor UIColor 否 cell的背景颜色

使用说明:设置相关UI方式同KFCreateRequestView.h。