I am having an issue where i am trying to show an in-app banner (above the status bar) within the application. The problem is that when i am in the middle to typing an text in the textfield, and if the banner shows up, it removes the keyboard, and then the keyboard show up again once the banner has been disappeared(it is on timer). Is there a way to have a banner view above status bar, and at the same time not have the keyboard disappear if the keyboard is the first responder.
InAppNotificationView* _sharedPushView = nil;
NSArray * nibArr = [[NSBundle mainBundle] loadNibNamed: @"InAppNotificationView" owner: self options: nil];
for (id currentObject in nibArr)
{
if ([currentObject isKindOfClass: [InAppNotificationView class]])
{
_sharedPushView = (InAppNotificationView*) currentObject;
break;
}
}
_sharedPushView.delegate = self;
[self.displayedPushViews addObject: _sharedPushView];
_topView.window.windowLevel = UIWindowLevelStatusBar;
[UIView animateWithDuration: 0.25
animations: ^
{
CGPoint centerPoint = _sharedPushView.center;
centerPoint.y += _sharedPushView.frame.size.height;
_sharedPushView.center = centerPoint;
}
completion: nil];
[self.closeTimer invalidate];
self.closeTimer = nil;
self.closeTimer = [NSTimer scheduledTimerWithTimeInterval: 3.0f
target: self
selector: @selector(close)
userInfo: nil
repeats: NO];