Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-10039

iOS: Label does not show in nested views

    Details

      Description

      Run the following code:

      var win = Ti.UI.createWindow({
      	navBarHidden : true,
      	backgroundColor : 'white'
      });
       
      var parentView = Ti.UI.createView({
      	backgroundColor : 'blue',
      	width : Ti.UI.FILL,
      	height : Ti.UI.SIZE,
      });
       
      function createContent() {
       
      	var view = Ti.UI.createView({
      		top : 0,
      		layout : 'horizontal',
      		width : Ti.UI.FILL,
      		height : Ti.UI.SIZE,
      		backgroundColor : 'red'
      	});
       
      	var header = Ti.UI.createView({
      		width : '90%',
      		height : '75dp',
      		backgroundColor : 'green'
      	});
       
      	var label = Ti.UI.createLabel({
      		top : 0,
      		height : '75dp',
      		width : '50%',
      		text : 'Testing ...'
      	});
       
      	var active = Ti.UI.createSwitch({
      		top : 0,
      		value:true
      		//style : Ti.UI.Android.SWITCH_STYLE_CHECKBOX
      	});
       
      	header.add(label);
      	header.add(active);
       
      	view.add(header);
       
      	return view;
      }
       
      for (var i = 0; i < 3; ++i) {
      	parentView.add(createContent());
      }
       
      win.add(parentView);
       
      win.open(); 
      

      Expected result:
      The 'testing' label should show

      Actual result:
      The 'testing' label does not show up

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              ayeung Allen Yeung
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-5437
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code