mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Add option to hide "Add Image" attachment button
This commit is contained in:
@@ -69,6 +69,14 @@
|
|||||||
///-----------------------------------------------------------------------------
|
///-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Don't show the option to add images from the photo library
|
||||||
|
|
||||||
|
This is helpful if your application is landscape only, since the system UI for
|
||||||
|
selecting an image from the photo library is portrait only
|
||||||
|
*/
|
||||||
|
@property (nonatomic) BOOL hideImageAttachmentButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
An array of data objects that should be used to prefill the compose view content
|
An array of data objects that should be used to prefill the compose view content
|
||||||
|
|
||||||
|
|||||||
@@ -248,7 +248,9 @@
|
|||||||
|
|
||||||
[self.textAccessoryView addSubview:self.addPhotoButton];
|
[self.textAccessoryView addSubview:self.addPhotoButton];
|
||||||
|
|
||||||
|
if (!self.hideImageAttachmentButton) {
|
||||||
self.textView.inputAccessoryView = self.textAccessoryView;
|
self.textView.inputAccessoryView = self.textAccessoryView;
|
||||||
|
}
|
||||||
|
|
||||||
// This could be a subclass, yet
|
// This could be a subclass, yet
|
||||||
self.attachmentScrollView = [[UIScrollView alloc] initWithFrame:CGRectZero];
|
self.attachmentScrollView = [[UIScrollView alloc] initWithFrame:CGRectZero];
|
||||||
|
|||||||
@@ -234,6 +234,19 @@ typedef NS_ENUM(NSInteger, BITFeedbackObservationMode) {
|
|||||||
@property (nonatomic, copy) NSArray *feedbackComposerPreparedItems;
|
@property (nonatomic, copy) NSArray *feedbackComposerPreparedItems;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Don't show the option to add images from the photo library
|
||||||
|
|
||||||
|
This is helpful if your application is landscape only, since the system UI for
|
||||||
|
selecting an image from the photo library is portrait only
|
||||||
|
|
||||||
|
This setting is used for all feedback compose views that are created by the
|
||||||
|
`BITFeedbackManager`. If you invoke your own `BITFeedbackComposeViewController`,
|
||||||
|
then set the appropriate property on the view controller directl!.
|
||||||
|
*/
|
||||||
|
@property (nonatomic) BOOL feedbackComposeHideImageAttachmentButton;
|
||||||
|
|
||||||
|
|
||||||
///-----------------------------------------------------------------------------
|
///-----------------------------------------------------------------------------
|
||||||
/// @name User Interface
|
/// @name User Interface
|
||||||
///-----------------------------------------------------------------------------
|
///-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ NSString *const kBITFeedbackUpdateAttachmentThumbnail = @"BITFeedbackUpdateAttac
|
|||||||
- (BITFeedbackComposeViewController *)feedbackComposeViewController {
|
- (BITFeedbackComposeViewController *)feedbackComposeViewController {
|
||||||
BITFeedbackComposeViewController *composeViewController = [[BITFeedbackComposeViewController alloc] init];
|
BITFeedbackComposeViewController *composeViewController = [[BITFeedbackComposeViewController alloc] init];
|
||||||
[composeViewController prepareWithItems:self.feedbackComposerPreparedItems];
|
[composeViewController prepareWithItems:self.feedbackComposerPreparedItems];
|
||||||
|
[composeViewController setHideImageAttachmentButton:self.feedbackComposeHideImageAttachmentButton];
|
||||||
|
|
||||||
// by default set the delegate to be identical to the one of BITFeedbackManager
|
// by default set the delegate to be identical to the one of BITFeedbackManager
|
||||||
[composeViewController setDelegate:self.delegate];
|
[composeViewController setDelegate:self.delegate];
|
||||||
|
|||||||
Reference in New Issue
Block a user