DJComposePageView.m
- (void)deleteInputEmotion { // 发通知 [[NSNotificationCenter defaultCenter] postNotificationName:DJEmotionDidDeletedNotification object:nil]; }
DJComposeViewController.m
// 注册监听删除表情通知 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onReceiveEmotionDidDeletedNotification) name:DJEmotionDidDeletedNotification object:nil];
/** 接收到删除表情通知 */ - (void)onReceiveEmotionDidDeletedNotification { [self.textView deleteBackward]; }
最终效果: