Added functionality for setting feedback composer initial items via BITFeedbackManager

This commit is contained in:
Yuriy 2015-03-06 13:29:02 +02:00
parent 2ce5834c66
commit 60da89d45b
2 changed files with 14 additions and 0 deletions

View File

@ -222,6 +222,18 @@ typedef NS_ENUM(NSInteger, BITFeedbackObservationMode) {
@property (nonatomic, readwrite) BITFeedbackObservationMode feedbackObservationMode;
/**
Prefill feedback compose message user interface with the items given.
All NSString-Content in the array will be concatenated and result in the message,
while all UIImage and NSData-instances will be turned into attachments.
@param items an NSArray with objects that should be attached
@see `[BITFeedbackComposeViewController prepareWithItems:]`
*/
@property (nonatomic, copy) NSArray *feedbackComposerPreparedItems;
///-----------------------------------------------------------------------------
/// @name User Interface
///-----------------------------------------------------------------------------

View File

@ -224,6 +224,8 @@ NSString *const kBITFeedbackUpdateAttachmentThumbnail = @"BITFeedbackUpdateAttac
- (BITFeedbackComposeViewController *)feedbackComposeViewController {
BITFeedbackComposeViewController *composeViewController = [[BITFeedbackComposeViewController alloc] init];
[composeViewController prepareWithItems:self.feedbackComposerPreparedItems];
// by default set the delegate to be identical to the one of BITFeedbackManager
[composeViewController setDelegate:self.delegate];
return composeViewController;