You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/10/29 14:28:38 UTC

[GitHub] [cordova-plugin-statusbar] dertieran commented on a change in pull request #134: feat: get statusbar height (top-inset)

dertieran commented on a change in pull request #134:
URL: https://github.com/apache/cordova-plugin-statusbar/pull/134#discussion_r514301773



##########
File path: src/ios/CDVStatusBar.m
##########
@@ -195,6 +195,14 @@ - (void) _ready:(CDVInvokedUrlCommand*)command
     }
 }
 
+- (void) height:(CDVInvokedUrlCommand*)command
+{
+    double statusBarHeight = [UIApplication sharedApplication].statusBarFrame.size.height;
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDouble:statusBarHeight];
+    [result setKeepCallbackAsBool:YES];

Review comment:
       Yes that is the intend, otherwise the callback will be deleted on the js side.
   https://github.com/apache/cordova-js/blob/0608bf932289c143405e90dc8edd3449f78f5fdc/src/cordova.js#L230-L233




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org