I am building an iOS app on Titanium 2.0.1 and have run into a weird issue.
I have a table that a user enters values into and on the bottom is a button in a view placed as the footerView of the table. When the user clicks on a table field to type in a value the soft keyboard comes up as usual, but then when the textField.blur() is called the view below the table is the size of the soft keyboard. I have even tried setting the height of the view back to its original size, but the button still scrolls all the way to the top and scrolls the rest of the table out of the view. I even write the height of the View to the Ti.API.Info and it reads the correct height, but it doesn't reflect in the view itself. I unfortunately don't have a screenshot, but some code is below.
Here is my button, footerView and tableView and then adding it to the current window.
var addToTrackButton = Ti.UI.createButton({ font:{fontSize:17, fontWeight:'bold'}, height: 45, left: 10, right: 10, top: 0, enabled: false, opacity: 0.5, title: 'Add to Tracker' }); addToTrackButton.addEventListener('click', addToTracker); var addtrackButtonView = Titanium.UI.createView({ id:'addtrackButtonView', height: 105, width: 'auto', backgroundColor: 'transparent', }); addtrackButtonView.add(addToTrackButton); tableView = Ti.UI.createTableView({ data: totalPointsData, style: Titanium.UI.iPhone.TableViewStyle.GROUPED, borderWidth: 0, borderColor: 'transparent', hasChild: false, }); tableView.footerView = addtrackButtonView; win.add(tableView);Here is the function that tries to fix the height on textField.blur:
function addToTracker() { //HIDE ALL KEYBOARDS textFieldsArray['PROTEIN'].blur(); textFieldsArray['CARBS'].blur(); textFieldsArray['FAT'].blur(); textFieldsArray['FIBER'].blur(); addtrackButtonView.height = 105; alert('HEIGHT: ' + addtrackButtonView.height); ... }Anyone seen this before or know a fix for it? Is there a way to check which view is actually getting a bigger height? Thank you!
Your Answer
Think you can help? Login to answer this question!