Appcelerator tableviewsection top margin on iOS

52 Views Asked by At

I have an ios app developed with titanium appcelerator. In the app I have some tablevies where I add some rows and some sections to create that sticky effect. But for some reason the sections have a top margin. Is there a way to remove that margin? The margin was not defined by me.

This is my TableView:

var mainView = Ti.UI.createTableViewRow({
        height: Ti.UI.SIZE,
        width: "100%",
        backgroundSelectedColor: 'transparent',
        backgroundSelectedColor: 'transparent',
        selectedColor: 'transparent',
        bottom: 0,
});

And the I add some TableViewSections to it:

tableData.push(Ti.UI.createTableViewSection({
        headerView: require("addStickyHeader").addStickyHeader(letra.toUpperCase()),
}));

The addStickyHeader function:

exports.addStickyHeader = function(text) {

var viewHeader = Ti.UI.createView({
    height : Ti.App.screenSize[0] * 0.08,
    width : "100%",
    backgroundColor : require("colors").fundo(),
    top : -100
});

viewHeader.add(Ti.UI.createLabel({
    text : text.toUpperCase(),
    color : require("colors").branco(),
    width : "84.6%",
    font : {
        fontSize : Ti.App.screenSize[0] * 0.019,
        fontFamily : require("fonts").semiBold()
    },
}));

return viewHeader;

};

That white parte should not be there.

0

There are 0 best solutions below