I am trying to hide the TabBar with this code but it doesnt hide it.
could someone advise please.
when I am trying this method the app crush.
Narek
could someone advise please.
B4X:
#If OBJC
- (void) hideTabBar:(UITabBarController *) tabbarcontroller
{
CGRect screenRect = [[UIScreen mainScreen] bounds];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
float fHeight = screenRect.size.height;
if( UIDeviceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation) )
{
fHeight = screenRect.size.width;
}
for(UIView *view in tabbarcontroller.view.subviews)
{
if([view isKindOfClass:[UITabBar class]])
{
[view setFrame:CGRectMake(view.frame.origin.x, fHeight, view.frame.size.width, view.frame.size.height)];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, fHeight)];
view.backgroundColor = [UIColor blackColor];
}
}
[UIView commitAnimations];
}
#End if
Private Sub HideT(tskbr As TabBarController)
Dim nm As NativeObject=app
nm.RunMethod("hideTabBar:",Array(tskbr))
End Sub
when I am trying this method the app crush.
Narek