测试已测试 | ✗ |
语言语言 | CC |
许可协议 | MIT |
发布最后发布 | 2017年12月 |
SwiftSwift 版本 | 3.0 |
由 Jitendra Changlani 维护。
依赖 | |
MBProgressHUD | ~> 0.9.2 |
ReachabilitySwift | ~> 3 |
SDWebImage | ~> 3.7 |
一个用于将反馈界面集成到项目中的 Swift 3.0 框架。简单易用。
使用 CocoaPods 设置
pod 'FeedbackPod', '~> 1.2.1'
导入 pod FeedbackPod
import FeedbackPod
您可以将以下代码复制粘贴,并提供将反馈界面集成所需的相关细节。
// write below code in viewDidLoad of your controller
let bundle = Bundle(identifier: "org.cocoapods.FeedbackPod") // as need to access the Xib from other bundle
let controller = FeedbackVC(nibName: "FeedbackVC", bundle: bundle) // get the controller object
controller.appID = Constants.AppKeys.KALoggerURL // LogCamp Url
controller.appID = Constants.AppKeys.KALoggerAppID // provide KALogger id
controller.appKey = Constants.AppKeys.KALoggerAppKey // provide KALogger application key
controller.langCode = self.getSelectedLanguageTextCode() // optional if your application supports language support e.g :- "en" , "es"
controller.submitButtonColor = Constants.AppColors.firstButtonColor // provide button color according to the theme of application
controller.userName = "" // optional if user is logged in
controller.userFirstName = "" // optional if user is logged in
controller.userLastName = "" // optional if user is logged in
// code to make feedback screen as child view of your controller
addChildViewController(controller)
self.view.addSubview(controller.view)
controller.view.frame = view.bounds
controller.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
controller.didMove(toParentViewController: self)
最后,如果您的应用支持语言,则在 Localizable.string 文件中提供以下键
// Do not provide below keys if your app supports only Engish language as it is by default provided
// Feedback Screen keys
"keyPlaceHolder" = "Write your review here";
"keyHowInfoLabel" = "How Happy are you with %@?";
"keyUserFeedback" = "User Feedback";
"keyMessage" = "Please rate us or write something in feedback";
"keyAppFeedBack" = "%@ App Feedback";
"keyThankYou" = "Thank you";
"keyFeedbackSubmitted" = "Your feedback submitted successfully";
"keyGallery" = "Gallery";
"keySelectSource" = "Select source";
"keyDelete" = "Delete";
"keyPreview" = "Preview";
"keyCameraText" = "Camera";
"keyPhotos" = "Photos";
"keyFeedbackOrComment" = "Your Feedback/Comments";
"keySubmit" = "Submit";
"keyOkButtonLabel" = "OK";
"keySourceNotAvailable" = "Source type not available";
"keyProcessing" = "Loading..";
"keyNetworkError" = "Network Error";
"keyNoInternet" = "Application requires network access either through WiFi or Mobile network.";
"keyCancelButtonlabel" = "Cancel";