open/demo_src/TCP_Client/MobileIMSDK4iDemo_tcp/MobileIMSDK4iDemo/UIViewController+Ext.m

47 lines
1.6 KiB
Mathematica
Raw Normal View History

2025-01-18 15:55:12 +08:00
// ----------------------------------------------------------------------
// Copyright (C) 2021 (52im.net) & Jack Jiang.
// The MobileIMSDK_TCP (MobileIMSDK v6.x TCP) Project.
// All rights reserved.
//
// > Github: https://github.com/JackJiang2011/MobileIMSDK
// > : http://www.52im.net/forum-89-1.html
// > http://www.52im.net/
// > 215477170 (http://www.52im.net/topic-qqgroup.html)
// >
// > http://www.52im.net/thread-2792-1-1.html
//
// "即时通讯网(52im.net) - 即时通讯开发者社区!"
// ----------------------------------------------------------------------
#import "UIViewController+Ext.h"
#import "Toast+UIView.h"
@implementation UIViewController (Ext)
- (IBAction)E_textFieldDidEndOnExit:(id)sender
{
//
[sender resignFirstResponder];
}
- (IBAction)E_clickBgToHideKeyboard:(id)sender
{
NSLog(@"点击了背景!");
// (iOS 6)
[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];
}
- (void) E_showToastInfo:(NSString *)title withContent:(NSString *)content onParent:(UIView *)parentView
{
// Make toast with an image & title
// Toast+UIView catlog
[parentView makeToast:content
duration:3.0
position:@"top"
title:title
image:[UIImage imageNamed:@"info.png"]];
}
@end