session-ios/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.h
Michael Kirk 81268012e5 Better keyboard management.
- fixes problems on iOS11.2 where emoji keyboard sometimes obscures text
  input.
- better animation for interactive pan gesture when viewing message
  details
- more intuitive swipe-to-dismiss keyboard in conversation view
- converge on one mnethod for dismissing keyboard in conversation view

- [ ] Pop keyboard, then hit attachment, dismisses keyboard, which is
      fine, but the content should immediately scroll down with the
      keyboard, instead it stays up, and scrolls down only once the
      attachment action sheet has been dismissed.

// FREEBIE
2018-01-08 01:10:31 -05:00

75 lines
1.5 KiB
Objective-C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@class SignalAttachment;
@protocol ConversationInputToolbarDelegate <NSObject>
- (void)sendButtonPressed;
- (void)attachmentButtonPressed;
#pragma mark - Voice Memo
- (void)voiceMemoGestureDidStart;
- (void)voiceMemoGestureDidEnd;
- (void)voiceMemoGestureDidCancel;
- (void)voiceMemoGestureDidChange:(CGFloat)cancelAlpha;
#pragma mark - Attachment Approval
- (void)didApproveAttachment:(SignalAttachment *)attachment;
- (void)toolbarHeightDidChange:(CGFloat)newHeight;
@end
#pragma mark -
@class ConversationInputTextView;
@protocol ConversationInputTextViewDelegate;
@interface ConversationInputToolbar : UIView
@property (nonatomic, weak) id<ConversationInputToolbarDelegate> inputToolbarDelegate;
- (void)beginEditingTextMessage;
- (void)endEditingTextMessage;
- (void)setInputTextViewDelegate:(id<ConversationInputTextViewDelegate>)value;
- (NSString *)messageText;
- (void)setMessageText:(NSString *_Nullable)value;
- (void)clearTextMessage;
- (nullable NSString *)textInputPrimaryLanguage;
- (void)updateFontSizes;
#pragma mark - Voice Memo
- (void)showVoiceMemoUI;
- (void)hideVoiceMemoUI:(BOOL)animated;
- (void)setVoiceMemoUICancelAlpha:(CGFloat)cancelAlpha;
- (void)cancelVoiceMemoIfNecessary;
#pragma mark - Attachment Approval
- (void)showApprovalUIForAttachment:(SignalAttachment *)attachment;
- (void)viewWillAppear:(BOOL)animated;
- (void)viewWillDisappear:(BOOL)animated;
@end
NS_ASSUME_NONNULL_END