2. 传递触摸消息和键盘事件给UIView
具体实现
+ (PasswordInputWindow *)sharedInstance
{
static id sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [[self alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
});
return sharedInstance;
}
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
//setup UI
}
- (void)show
{
[self makeKeyWindow];
self.hidden = NO;
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
[[PasswordInputWindow sharedInstance] show];
}搬砖工看这里: http://download.csdn.net/detail/luozhonglan/8608207
******************************************************************************************************************************************************************************************************
posted by 罗大佑子
2015-4-18
原文:http://blog.csdn.net/casablaneca/article/details/45116525