omorandi / TiSMSDialog

Appcelerator Titanium Mobile module implementing an SMS sending dialog (similar to Ti.UI.EmailDialog)
MIT License
141 stars 27 forks source link

'To' address bar partially hidden #19

Open agrycroko opened 9 years ago

agrycroko commented 9 years ago

Hi @omorandi I'm using this module on an iPad running iOS8 and 9 with Ti SDK 5.0.0. When the SMS dialog appears the 'To' address bar is partially hidden below the 'New Message' navigation bar - see attached image.

Works great on an iPhone.

img_0027

omorandi commented 9 years ago

Hi, can you give some more details on the kind of ipad? Are you seeing this on both iOS8 and iOS9? iPad only, or also iPhone? For instance, I couldn't reproduce this in my tests with either ios8, or 9. Moreover, the sms dialog is a system control, so I doubt we can do anything for it. In other words it looks like it could be an iOS bug.

agrycroko commented 9 years ago

Hi, it's on an iPad Air running iOS9. Works fine on an iPhone (opens full screen), it's just an iPad issue.

So, I've got a Ti window defined as:

var myWindow = Ti.UI.createWindow({ backgroundColor: '#000000', fullscreen: true, tabBarHidden: true, navBarHidden: true });

Then later on in this window's code I call the module's .open({animated: true}) method to make it appear over the top of my window.

The gap above the SMS dialog's nav bar in my previous screen shot looks to be about the height of where the iOS status bar would go?

If you are unable to reproduce it, it may be something peculiar to my app code maybe.

Thanks, Gary.

agrycroko commented 9 years ago

Also in tiapp.xml I have these settings:

<fullscreen>true</fullscreen>
<navbar-hidden>true</navbar-hidden>

And these in ios plist settings:

<key>UIPrerenderedIcon</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
omorandi commented 9 years ago

Ok, I've been able to reproduce this and it's an issue with the full-screen setting. I tried some possible solutions, but without much success. Actually the sms module from Ben Bahrenburg (https://github.com/benbahrenburg/benCoding.SMS) seems to have some code in place for handling similar situations: https://github.com/benbahrenburg/benCoding.SMS/blob/master/Classes/BencodingSmsSMSDialogProxy.m#L159

It would be worth a try

agrycroko commented 9 years ago

Hi @omorandi thanks for looking into this and good news you've managed to reproduce the problem. I did actually use the Bencoding module before trying yours, but will look at the code. If you're also able to come up with a solution please post here :) I've got a client app nearing completion that's using SMS so would be great to have it working. Regards.

agrycroko commented 9 years ago

Didn't mention above - the Bencoding module was showing the same issue before I tried yours :)

agrycroko commented 9 years ago

OK, when I set the fullscreen: true Ti Window property to false and then open the SMS dialog it works properly - great news.

The side-effect of doing this is the status bar appears at the top of the Ti Window, so have made this look prettier by opening a plain white Ti Window with fullscreen: false then immediately opening the SMS dialog over the top of it.

Thanks for you help.