Closed ivanharmat closed 10 years ago
Haven't looked into it. No time at the moment. Give it a try!
Alright, I'll see what I can do. Thanks for the quick reply.
I did not spend much time trying to fix it, but this little hack fixes the iOS 8 issue for me:
- (CGRect)orientFrame:(CGRect)frame
{
NSString *systemVersion = [UIDevice currentDevice].systemVersion;
NSUInteger systemInt = [systemVersion intValue];
if ( (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) || UIDeviceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) && systemInt < 8 )
{
frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.height, frame.size.width);
}
return frame;
}
I just simply added an iOS version number to the if conditional above.
Having the same issue in landscape, the bar is taking the whole view unfortunately.
have you tried to replace the orientFrame method with the one above? That fixed the problem for me.
Yes I tried, but problem is that when I turn my device, tap on the button which shows the message, it's shown as portrait
EDIT: Tried again it works! Thanks man. Don't know why it was bugging me yesterday.
@ivanharmat do you want to submit a pull request with your patch?
sure. thanks. I'll get to it right now.
@terryworona I can't push my branch to git. It says "Permission to terryworona/TWMessageBarManager.git denied to ivanharmat." Can you updated the code and create a new commit?
You'll have to issue a pull request @ivanharmat
See: https://help.github.com/articles/using-pull-requests
I can cherry pick your code but then you won't get any credit :)
OK @terryworona, let me try again. I need to learn this anyway :)
@PhillipApps Please replace orientFrame method with this
(CGRect)orientFrame:(CGRect)frame { NSString *systemVersion = [UIDevice currentDevice].systemVersion; NSUInteger systemInt = [systemVersion intValue];
if ( (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight) && systemInt < 8 ) { frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); } return frame; }
frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.height, frame.size.width); in original code which should be like this
frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
thanks
How could this be fixed? Messages work fine with portrait orientation, but they are either cut off (iPhone) or all over the screen (iPad). iOS 7 works like a charm, both orientations. Thank you.