📄 myuiwindow.m
字号:
#import "MyUIWindow.h"@implementation MyUIWindow- (IBAction)sendMsg:(id)sender { NSString* nstrMsgId = @"register"; NSString* nstrMsgDest = @"Owen"; NSString* nstrMsgBody = oTextSend.text; CommuServerAppDelegate* delegate = [[UIApplication sharedApplication] delegate]; iMsg* msg = [delegate._communicate bundleMsgWithMsgId:nstrMsgId Dest:nstrMsgDest Body:nstrMsgBody]; [delegate._communicate sendMsgToClient:msg];}- (void)recvRegisterFromClient:(iMsg*)msg{ [oTextRecv setText:msg->_msgBody];}- (void)recvTextChat:(iMsg*)msg{ // transmit message CommuServerAppDelegate* delegate = [[UIApplication sharedApplication] delegate]; [delegate->_communicate sendMsgToClient:msg];}- (void)becomeKeyWindow{ oTextRecv.text = @""; oTextSend.text = @"";}- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ // Dismiss the keyboard when the view outside the text field is touched. [oTextSend resignFirstResponder]; [oTextRecv resignFirstResponder]; // Revert the text field to the previous value. [super touchesBegan:touches withEvent:event];}@end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -