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

iOS: Media - Default Camera button is moving down the screen

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.0.2
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      Titanium Studio, build: 3.0.2.201302141201
      Titanium SDK, build: 3.0.2.v20130207164659
      Xcode 4.6
      Devices:
      iPhone4 iOS 5.1.1
      iPad mini iOS 6.0.2

      Description

      While testing Media Module I noticed "Default Camera" button being moved down the screen. It is not regression, occurs in 3.0.0.GA.
      Test steps:
      Run test code

       
      		// create window with vertical layout
      		var win = Ti.UI.createWindow({backgroundColor:'white', layout:'vertical'});
      		
      		
      		// create button, register the modified click callback, add button to window
      		function addButton(title, clickCallback)
      		{
      			var button = Ti.UI.createButton({title:title, width:'300', height:'50'});
      			
      			button.addEventListener('click', function() {
      				Ti.Media.showCamera({mediaType:Ti.Media.MEDIA_TYPE_PHOTO});
      				clickCallback();
      				Ti.Media.vibrate();
      				});
      				
      			win.add(button);
      		}
      		
      		// camera with no switch
      		addButton('Default Camera', function(){
      			
      		});
      		
      		// camera with front specified
      		addButton('Front Camera Test 1', function(){
      			Ti.Media.switchCamera(Ti.Media.CAMERA_FRONT);
      		});
      		
      		// camera with front specified after switching to back
      		// checks if switch function actually works, opposed to it being the default
      		addButton('Front Camera Test 2', function(){
      			Ti.Media.switchCamera(Ti.Media.CAMERA_REAR);
      			Ti.Media.switchCamera(Ti.Media.CAMERA_FRONT);
      		});
      		
      		// camera with back specified
      		addButton('Back Camera Test 1', function(){
      			Ti.Media.switchCamera(Ti.Media.CAMERA_REAR);
      		});
      		
      		// camera with back specified after switching to front
      		// checks if switch function actually works, opposed to it being the default
      		addButton('Back Camera Test 2', function(){
      			Ti.Media.switchCamera(Ti.Media.CAMERA_FRONT);
      			Ti.Media.switchCamera(Ti.Media.CAMERA_REAR);
      		});
      		
      		// camera passed invalid (non-existent) argument
      		addButton('Invalid Camera', function(){
      			Ti.Media.switchCamera(undefined);
      		});
      		
      		// open window
      		 win.open();
       
      
      

      2. Press "Default Camera"
      3. Press Cancel and observe the button on the bottom of the screen

      Note:
      Adding 'top : 5 to the properties
      var button = Ti.UI.createButton(

      {title:title, width:'300', height:'50'}

      );

      will fix this issue.

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              oromero Olga Romero
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration