-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
135 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// BFUserFeedbackViewController.h | ||
// BugfenderSDK | ||
// | ||
// Created by Rubén Vázquez Otero on 15/10/2018. | ||
// Copyright © 2018 Mobile Jazz. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "BFUserFeedbackViewController.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface BFUserFeedbackNavigationController : UINavigationController | ||
|
||
|
||
|
||
/** | ||
Root View Controller containing a table with the textfields used to gather feedback | ||
*/ | ||
@property (nonatomic, strong) BFUserFeedbackViewController *feedbackViewController; | ||
|
||
/** | ||
Provides a View Controller to gather the feedback of the users and sent it to Bugfender. | ||
The returning BFUserFeedbackNavigationController has to be presented modally and it has it's own Send and Cancel buttons | ||
Additionally, it is possible to customize the aspect of the screen accessing BFUserFeedbackNavigationController.feedbackViewController | ||
@param title Title for the navigation bar | ||
@param hint Short text at the beginning | ||
@param subjectPlaceholder placeholder in the subject textfield | ||
@param messagePlaceholder placeholder in the message textfield | ||
@param sendButtonTitle title for the send button in the navigation bar | ||
@param cancelButtonTitle title for the cancel button | ||
@return BFUserFeedbackNavigationController containing a BFUserFeedbackViewController as root view controller | ||
*/ | ||
+ (BFUserFeedbackNavigationController *)userFeedbackViewControllerWithTitle:(NSString *)title | ||
hint:(NSString *)hint | ||
subjectPlaceholder:(NSString *)subjectPlaceholder | ||
messagePlaceholder:(NSString *)messagePlaceholder | ||
sendButtonTitle:(NSString *)sendButtonTitle | ||
cancelButtonTitle:(NSString *)cancelButtonTitle | ||
completion:(void (^)(BOOL feedbackSent))completionBlock; | ||
|
||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// | ||
// BFUserFeedbackViewController.h | ||
// BugfenderSDK | ||
// | ||
// Created by Rubén Vázquez Otero on 16/10/2018. | ||
// Copyright © 2018 Mobile Jazz. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface BFUserFeedbackViewController : UITableViewController { | ||
|
||
} | ||
|
||
#pragma mark - Background colors | ||
|
||
/** | ||
The background of the view controller | ||
*/ | ||
@property (nonatomic, strong) UIColor *mainBackgroundColor; | ||
|
||
/** | ||
Background for textfields | ||
*/ | ||
@property (nonatomic, strong) UIColor *secondaryBackgroundColor; | ||
|
||
#pragma mark - Hint | ||
|
||
/** | ||
The hint is the upper text in the view controller. | ||
Use the hint give instructions to your users or just to thank them for providing feedback | ||
*/ | ||
@property (nonatomic, strong) NSString *hint; | ||
|
||
@property (nonatomic, strong) UIFont *hintFont; | ||
|
||
@property (nonatomic, strong) UIColor *hintFontColor; | ||
|
||
#pragma mark - Subject | ||
|
||
/** | ||
The subject of the feedback. | ||
Remember to provide a placeholder | ||
*/ | ||
@property (nonatomic, strong) UIFont *subjectFont; | ||
|
||
@property (nonatomic, strong) UIColor *subjectFontColor; | ||
|
||
@property (nonatomic, strong) UIColor *subjectPlaceholderFontColor; | ||
|
||
@property (nonatomic, strong) NSString *subjectPlaceholder; | ||
|
||
#pragma mark - Message | ||
/** | ||
The message of the feedback | ||
Remember to provide a placeholder | ||
*/ | ||
@property (nonatomic, strong) UIFont *messageFont; | ||
|
||
@property (nonatomic, strong) UIColor *messageFontColor; | ||
|
||
@property (nonatomic, strong) UIColor *messagePlaceholderFontColor; | ||
|
||
@property (nonatomic, strong) NSString *messagePlaceholder; | ||
|
||
#pragma mark - Actions | ||
|
||
- (void)dismiss; | ||
|
||
- (void)sendFeedback; | ||
|
||
/** | ||
Pass a block if you want to be notified after feedback was sent (or not) | ||
*/ | ||
@property (nonatomic, copy) void (^completionBlock)(BOOL feedbackSent); | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters