Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24731] iOS: Resolve iOS 8 deprecations for willAnimateRotationToInterfaceOrientation

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-08-08T21:07:24.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.2.0
Componentsn/a
Labelsn/a
ReporterVijay Singh
AssigneeVijay Singh
Created2017-05-24T04:26:43.000+0000
Updated2017-08-08T22:28:32.000+0000

Description

In SDK 6.0.0, we updated the default minimum iOS target to 8.0 as a result of the Xcode 8.x version that is now supported. Doing that, our iOS SDK core shows some deprecation-warnings regarding API's that should be replaced in iOS 8 and later. Replace willAnimateRotationToInterfaceOrientation: (used in many places, migration required) This is subset of ticket TIMOB-24335.

Comments

  1. Vijay Singh 2017-06-12

    PR: https://github.com/appcelerator/titanium_mobile/pull/9138 Please check behavior by rotating device. Test Case 1 : Tab Group
       var win1 = Ti.UI.createWindow({
           backgroundColor: 'blue',
           title: 'Blue'
       });
       win1.add(Ti.UI.createLabel({text: 'I am a blue window.'}));
       
       var win2 = Ti.UI.createWindow({
           backgroundColor: 'red',
           title: 'Red'
       });
       win2.add(Ti.UI.createLabel({text: 'I am a red window.'}));
       
       var tab1 = Ti.UI.createTab({
           window: win1,
           title: 'Blue'
       }),
       tab2 = Ti.UI.createTab({
           window: win2,
           title: 'Red'
       }),
       tabGroup = Ti.UI.createTabGroup({
           tabs: [tab1, tab2]
       });
       tabGroup.open();
       
    Test Case 2 : Scroll View
       var win = Ti.UI.createWindow();
       
       var nav = Titanium.UI.iOS.createNavigationWindow({
       window:win,
       backgroundColor:'red'
       });
       var view1 = Ti.UI.createView({ backgroundColor:'#123' });
       var view2 = Ti.UI.createView({ backgroundColor:'#246' });
       var view3 = Ti.UI.createView({ backgroundColor:'#48b' });
       
       var scrollableView = Ti.UI.createScrollableView({
         views:[view1,view2,view3],
         showPagingControl:true
       });
       
       win.add(scrollableView);
       nav.open();
       
    Test Case 3 : Split window for iPad
       var detail = Ti.UI.createWindow({backgroundColor: 'white'});
       var label1 = Ti.UI.createLabel({text: 'Detail View'});
       detail.add(label1);
       var detailNav = Ti.UI.iOS.createNavigationWindow({window: detail});
       
       var master = Ti.UI.createWindow({backgroundColor: 'gray'});
       var label2 = Ti.UI.createLabel({text: 'Master View'});
       master.add(label2);
       var masterNav = Ti.UI.iOS.createNavigationWindow({window: master});
       
       var splitWin = Ti.UI.iOS.createSplitWindow({
           detailView: detailNav,
           masterView: masterNav
       });
       splitWin.open();
       
       
    Test Case 4: Navigation window
       var win2 = Titanium.UI.createWindow({
           backgroundColor: 'red',
           title: 'Red Window'
       });
       
       var win1 = Titanium.UI.iOS.createNavigationWindow({
          window: win2
       });
       
       var win3 = Titanium.UI.createWindow({
           backgroundColor: 'blue',
           title: 'Blue Window'
       });
       
       var button = Titanium.UI.createButton({
           title: 'Open Blue Window'
       });
       button.addEventListener('click', function(){
           win1.openWindow(win3, {animated:true});
       });
       
       win2.add(button);
       var button2 = Titanium.UI.createButton({
           title: 'Close Blue Window'
       });
       button2.addEventListener('click', function(){
           win1.closeWindow(win3, {animated:false}); //win3.close() will also work!!
       });
       
       win3.add(button2);
       win1.open();
       
  2. Vijay Singh 2017-08-02

    Backported PR (6_2_X) : https://github.com/appcelerator/titanium_mobile/pull/9271 [~hknoechel] Can you please review this.
  3. Abir Mukherjee 2017-08-08

    FR passed. Closing ticket as changes are seen in these builds: SDK 6.2.0.v20170808135421 SDK 7.0.0.v20170808141753

JSON Source