Skip to content

Commit

Permalink
Fix button disappearing after app inactivation
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Zakharov committed Mar 31, 2020
1 parent e8a952e commit 2e7a44e
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/ios/CDVDecimalKeyboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ @implementation CDVDecimalKeyboard
CGRect cgButton;
BOOL isDecimalKeyRequired=YES;
UIButton *decimalButton;
BOOL isAppInBackground=NO;

- (void)pluginInitialize {
[[NSNotificationCenter defaultCenter] addObserver: self
Expand All @@ -19,27 +18,6 @@ - (void)pluginInitialize {
selector: @selector(keyboardWillDisappear:)
name: UIKeyboardWillHideNotification
object: nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(appWillResignActive:)
name:UIApplicationWillResignActiveNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(appDidBecomeActive:)
name:UIApplicationDidBecomeActiveNotification
object:nil];


}
- (void) appWillResignActive: (NSNotification*) n{
isAppInBackground = YES;
[self removeDecimalButton];
}

- (void) appDidBecomeActive: (NSNotification*) n{
if(isAppInBackground==YES){
isAppInBackground = NO;
[self processKeyboardShownEvent];
}
}

-(UIColor*) textColor {
Expand Down

0 comments on commit 2e7a44e

Please sign in to comment.