Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28428] iOS: LargeTitle (animation) is not rendered correctly

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2021-06-15T09:29:48.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.0.1
ComponentsiOS
LabelslistView, tableView
ReporterThomas Weber
AssigneeVijay Singh
Created2021-04-24T13:01:36.000+0000
Updated2021-06-15T09:29:48.000+0000

Description

When using a ListView with a Searchbar, setting _showSearchBarInNavBar=true_ and _hidesSearchBarWhenScrolling=false_ - the title is not rendered correctly. It is first "collapsed" and only displayed as "large title" after ListView has been pulled down. When opening a new ViewController, the title is briefly displayed "large", but then jumps to the "collapsed" view. See attached video / test app. The problem occurs at least since Ti SDK 9.3.3 and is still present in Ti SDK 10.0.0.v20210421092535. This thread might be helpful: https://developer.apple.com/forums/thread/660745

Attachments

FileDateSize
app.zip2021-04-24T12:59:29.000+00005947507
large-title-glitch-ios.mov2021-04-24T12:59:22.000+00007009162

Comments

  1. Vijay Singh 2021-04-27

    PR - https://github.com/appcelerator/titanium_mobile/pull/12752 Test Case 1 (List view) -
        var rows = [];
         for (var i = 0; i < 5; i++) {
             rows.push({ properties: { title: 'Row '+ i, searchableText:'Row '+i}});
         }
         var win = Ti.UI.createWindow({
           title: 'TEST',
           backgroundColor: '#ffffff',
           largeTitleEnabled: true,
       	hidesSearchBarWhenScrolling: false
         });  
         var navWin = Ti.UI.createNavigationWindow({window: win});
       
         var sb = Ti.UI.createSearchBar();
          
         var ls = Ti.UI.createListSection({
           items: rows
         });
          var lv = Ti.UI.createListView({
           sections: [ls],
           searchView: sb,
           showSearchBarInNavBar: true,
         });
          
         lv.addEventListener('itemclick', function(e) {
       	const window1 = Ti.UI.createWindow({
       		backgroundColor: '#fff',
       		title: 'Titanium rocks!',
       		titleAttributes: {
       			color: 'red'
       		},
       		largeTitleEnabled: true,
       		hidesSearchBarWhenScrolling: false
       	});
       	var sb1 = Ti.UI.createSearchBar();
          
       	var ls1 = Ti.UI.createListSection({
       		items: rows
       	});
       	var lv1 = Ti.UI.createListView({
       		sections: [ls1],
       		searchView: sb1,
       		showSearchBarInNavBar: true,
       	});
       	window1.add(lv1);
       	navWin.openWindow(window1);
         });
       
         win.add(lv);
         navWin.open();
       
    Test Case 2 (Table view) -
       const window = Ti.UI.createWindow({
       	backgroundColor: '#fff',
       	title: 'Titanium rocks!',
       	titleAttributes: {
       		color: 'red'
       	},
       	largeTitleEnabled: true,
       	hidesSearchBarWhenScrolling: false
       }); 
       const nav = Ti.UI.createNavigationWindow({ window });
       var searchBar = Ti.UI.createSearchBar();
       var tableView = Ti.UI.createTableView({
       	showSearchBarInNavBar: true,
           search: searchBar,
       	data: [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ]
       });
       window.add(tableView);
       nav.open();
       
       tableView.addEventListener('click', function (e) {
       	const window1 = Ti.UI.createWindow({
       		backgroundColor: '#fff',
       		title: 'Titanium rocks!',
       		titleAttributes: {
       			color: 'red'
       		},
       		largeTitleEnabled: true,
       		hidesSearchBarWhenScrolling: false
       	});
       	var searchBar1 = Ti.UI.createSearchBar();
       	var tableView1 = Ti.UI.createTableView({
       		showSearchBarInNavBar: true,
       	    search: searchBar1,
       		data: [ {title: 'Apples1'}, {title: 'Bananas1'}, {title: 'Carrots1'}, {title: 'Potatoes1'} ]
       	});
       	window1.add(tableView1);
       	nav.openWindow(window1);
       });
       
  2. Ewan Harris 2021-06-15

    FR Passed mater and 10_0_X PRs merged

JSON Source