登录 立即注册
金钱:

Code4App-iOS开发-iOS 开源代码库-iOS代码实例搜索-iOS特效示例-iOS代码例子下载-Code4App.com

ESFeedbackViewController 用户反馈视图

[复制链接]
来自: 李世铿 分类: iOS精品源码 上传时间: 2016-5-20 11:28:24
Tag:反馈 用户反馈 文本 自定义

项目介绍:

ESFeedbackViewController

ESFeedbackViewController 是一个展示提交用户反馈视图的iOS库. 他提供了一整套的用户反馈引导流程步骤。
  • A written suggestion. (用于用户反馈)
  • A review in the App Store.

Installation
Simply add ESFeedbackViewController to your Podfile: (支持cocoapods)
pod 'ESFeedbackViewController'


Usage (使用)
In your AppDelegate, once the application finished launching, add:
[Objective-C] 查看源文件 复制代码
#import <ESFeedbackViewController/ESFeedbackViewController.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  ...

  // The required number of application launches to show the feedback screen.
  [ESFeedbackViewController setNumberOfLaunchesToShow:NUMBER_OF_LAUNCHES];

  // The app ID, required to show redirect the user to the App Store.
  [ESFeedbackViewController setAppID:APP_ID];

  // Register that the application was launched.
  [ESFeedbackViewController registerAppLaunch];

  ...
}



Displaying
当 [ESFeedbackViewController registerAppLaunch] 被调用时, 一个用户反馈视图就会展现出来。 For example:

[Objective-C] 查看源文件 复制代码
@implementation MyViewController

- (void)viewDidAppear:(BOOL)animated {
  [super viewDidAppear:animated];
  [ESFeedbackViewController showIfNecessary];
}  

@end



Input tracking (追踪输入响应事件)
To track the input that the user performs step by step, a callback is provided. It is called each time the user dismisses a prompt. It receives a view controller that represents the dismissed prompt, and a boolean indicating if the user chose to continue or to cancel. Can be useful to hit an analytics/backend server to store the input:

[Objective-C] 查看源文件 复制代码
[ESFeedbackViewController setOnPromptWasDismissed:^(ESFeedbackPromptViewController *promptVC, BOOL ok) {
  NSLog(ok ? @"Pressed OK" : @"Pressed Cancel");

  if (promptVC.inputText.length > 0) {
    // If the prompt view controller has any way to input text, it can be accessed through the inputText property.
    NSLog(@"Input text: %@", promptVC.inputText);
  }
}];



Customization(自定义方法)
As an UI addon, the text and buttons font can be customized:
[Objective-C] 查看源文件 复制代码
[ESFeedbackViewController setTextFont:TEXT_FONT];
[ESFeedbackViewController setButtonsFont:BUTTONS_FONT];



DEMO下载:



相关源码推荐:

我来说两句
*滑动验证:
所有评论(29)
Mr..Jason 2016-5-21 15:28:38
正需要啊,感谢楼主无私分享!
回复
Mr..Jason 2016-5-21 15:36:18
下载了  怎么一运行就崩?
回复
hwp 2016-5-22 22:34:07
楼主用心了,内容非常精彩。
回复
半吱湮 2016-5-23 08:14:10
强烈支持楼主ing……
回复
王颖博 2016-5-23 11:16:56
很给力,Code4App有你更精彩!
回复
王颖博 2016-5-23 11:17:33
学习学习!
回复
ogqs0493 2016-5-24 15:47:10
感谢分享,Code4App有你更精彩:)
回复
topbar 2016-5-26 10:37:03
楼主威武啊,Code4App有你更给力!
回复
topbar 2016-5-26 10:41:52
报错,不行呀,老大
回复
123下一页
提取码:  下载次数:45 状态:已购或VIP 售价:0(原价:10)金钱 下载权限:初级码农 
1196 0 45
联系我们
首页/微信公众账号投稿

帖子代码编辑/版权问题

QQ:435399051,742864542

如何获得代码达人称号?

代码贡献英雄榜
用户名 下载数
通过邮件订阅最新 Code4App 信息
上一条 /4 下一条
联系我们
关闭
合作电话:
13802416937
Email:
435399051@qq.com
商务市场合作/投稿
问题反馈及帮助
联系我们

广告投放| Github|申请友链|手机版|Code4App ( 粤ICP备15117877号-1 )

快速回复 返回顶部 返回列表