3

It used to work like this:

correct appearance

But then, a developer working with our company made a bunch of changes to make the navbar and status bar the same color in iOS 7, changing the style of the status bar. Now, bringing up the SMS Message Composer looks like this:

beginning to slide up

almost done

When the status bar is expanded (such as when I am in a call), the message composer slides up a bit too far (as you can see in the third image) but then drops back down, the hole you see is filled with the gray recipients input area, and everything looks fine. So, even though it's worse than before, at least it winds up showing the correct thing. However, when the status bar is NOT expanded, I get this:

hole

The light gray sliver you see up there is part of the area where the recipients should appear. Showing/hiding the keyboard doesn't help. I have no idea what is causing it, and the developer doesn't have an iPhone to test with. So I thought I'd ask here ... what could possibly be the reason for this strange behavior, and any suggestions to fix it?

Gregory Magarshak
  • 1,883
  • 2
  • 25
  • 35
  • Can you share some code for navBar and statusBar changes? Also please share code where you call the SMS composer. – iEngineer Jan 02 '15 at 06:56
  • @Gregory Magarshak Have you tried the same code by creating other sample application? Is there also the same thing occurs, also try with different different device versions. – Mrunal Jan 02 '15 at 07:23
  • I will ask my friend who made the changes to respond here. – Gregory Magarshak Jan 02 '15 at 09:18
  • We rolled back changes and then isolated the code changes that cause this problem. Here is the diff https://gist.github.com/anonymous/852b61188f29eee2997e ... Before applying it the sms is fine. Afterwards you get the bug you see there. This is on an iPhone 5s and iOS 7 – Gregory Magarshak Jan 05 '15 at 02:05
  • iOS7 can ignore the status bar heigh, is the grey gap 20px? I often have to check for iOS 7 and greater and modify the view – Burf2000 Jan 06 '15 at 16:57
  • Check the diff, you can see what the code is doing ... I have found out that the problematic line is this: [[UINavigationBar appearance] setBackgroundImage:bgAsImage ... but why I don't know. If the setBackgroundImage function is not set everything works. – Gregory Magarshak Jan 06 '15 at 21:12
  • It's look like you are having the same issue as [here](http://stackoverflow.com/questions/21854588/ios-7-navigationbar-background-image-issue) – Pintouch Jan 08 '15 at 16:07

1 Answers1

1

I'd be curious what the bounds are here: https://gist.github.com/anonymous/852b61188f29eee2997e#file-gistfile1-diff-L54.. I'm guessing they won't be what you expect.. Can you add a log statement and post what it's setting the bounds to?

XeroxDucati
  • 5,130
  • 2
  • 37
  • 66
  • How is this different from the diff that I posted? Since posting I have found out that the problematic line is this: [[UINavigationBar appearance] setBackgroundImage:bgAsImage ... but why I don't know. If the setBackgroundImage function is not called everything works. If I set any image at all, it does this. Can you reproduce by setting a bg image on an MFMessageView controller yourself? Does it mess up on iOS 7? – Gregory Magarshak Jan 08 '15 at 06:57
  • Do you see what I mean? – Gregory Magarshak Jan 08 '15 at 22:30
  • I see the same issue on a repro case I tried -- it looks like a bug to me, it should work.. This http://stackoverflow.com/questions/13298448/ios6-mfmailcomposeviewcontroller-slow-to-load-and-flashes-black-screen-mailcom suggests a global composer -- I've never done one, but that might be worth a try.. – XeroxDucati Jan 09 '15 at 03:47
  • Hmm, that is about iOS 5 and 6 and mail composition... is that still the case? Did you try it on iOS 7 or on iOS 8? Where were you able to repro the bug? What do you suggest? atWh do you mean to use a global composer? – Gregory Magarshak Jan 09 '15 at 07:02