From 334ba1885006c47fbdcd03bb4f1f7936ba535a24 Mon Sep 17 00:00:00 2001 From: eggmanQQQ <3671373519@qq.com> Date: Fri, 31 May 2024 20:07:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=20#838=201.=20=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E6=A0=87=E9=A2=98=E4=B8=8A=E9=99=90=E8=87=B3=2025?= =?UTF-8?q?=EF=BC=88=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=B8=8A=E9=99=90=E6=98=AF?= =?UTF-8?q?=20100=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化: 1. keyboard 自动拉起 2. 启动时正确显示当前字数 --- .../YMRoom/View/Setting/View/XPRoomSettingInputView.m | 6 +++++- .../YMRoom/View/Setting/View/XPRoomSettingViewController.m | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingInputView.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingInputView.m index 99dae1ce..b9f5e2c6 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingInputView.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingInputView.m @@ -40,6 +40,7 @@ - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { + [self addNotification]; [self initSubViews]; [self initSubViewConstraints]; } @@ -61,7 +62,7 @@ [self addSubview:self.failLabel]; [self addSubview:self.stackView]; [self.stackView addArrangedSubview:self.cancelButton]; - [self.stackView addArrangedSubview:self.confirmButton]; + [self.stackView addArrangedSubview:self.confirmButton]; } - (void)initSubViewConstraints { @@ -100,6 +101,7 @@ #pragma mark - Event Response - (void)cancelButtonAction:(UIButton *)sender { + [self resignFirstResponder]; [TTPopup dismiss]; if (self.delegate && [self.delegate respondsToSelector:@selector(didClickCancel:)]) { [self.delegate didClickCancel:self.type]; @@ -195,6 +197,8 @@ NSAttributedString * attribute = [[NSAttributedString alloc] initWithString:_placeHolder attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17],NSForegroundColorAttributeName: [DJDKMIMOMColor secondTextColor]}]; self.contentTextField.attributedText = attribute; } + [self updateCount:placeHolder.length]; + [self.contentTextField becomeFirstResponder]; } - (void)setIsPwdError:(BOOL)isPwdError { diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m index 741f4df7..7a00931b 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m @@ -234,7 +234,7 @@ XPRoomSettingItemModel * itemModel = [[self.datasource safeObjectAtIndex1:indexP case RoomSettingItemType_Title: { XPRoomSettingInputView * titleView = [[XPRoomSettingInputView alloc] init]; - titleView.maxCount = 15; + titleView.maxCount = 25; titleView.delegate = self; titleView.type = RoomSettingInputType_Title; titleView.placeHolder = self.roomInfo.title;