[TIMOB-11397] iOS: Popover left/right nav button can't be set to null
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-10-30T18:10:16.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 3.1.0, 2012 Sprint 22 API, 2012 Sprint 22 |
Components | iOS |
Labels | SupportTeam, api, qe-testadded |
Reporter | Nikhil Sharma |
Assignee | Vishal Duggal |
Created | 2012-10-11T22:02:31.000+0000 |
Updated | 2014-06-19T12:43:13.000+0000 |
Description
Popover left/right nav button can't be set to null. We can't remove them. It gives a warning message = "-[NSNull barButtonItem]: unrecognized selector sent to instance 0x3650678"
Repo Case
1. Run the below code in the app.js 2. Click on the "Show Popover" button. 3. Now check the Titanium Studio console you've a warning exception.
var win = Titanium.UI.createWindow();
var button = Ti.UI.createButton({
title : 'Show popover',
width : 250,
height : 50,
top : 30,
right : 5
});
var popover = Ti.UI.iPad.createPopover({
width : 300,
height : 250,
rightNavButton : null,
title : 'I\'m a Popover',
backgroundColor : 'red',
barColor : 'green'
});
View = Titanium.UI.createView({
width : Ti.UI.FILL,
height : Ti.UI.FILL,
backgroundColor : '#900',
top : 0
});
button.addEventListener('click', function(e) {
popover.show({
view : button,
animated : true
});
});
popover.add(View);
win.add(button);
win.open();
Pull pending https://github.com/appcelerator/titanium_mobile/pull/3320
No exception shown. Verified on: Studio: 3.0.1.201212181159 SDK: 3.1.0.v20130114171802 iOS Device: iPad Simulator (v6.0), iPad Mini (v6.0) XCode: 4.5.2