?? 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 + -