Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15381] iOS7: Button title not shown with image in navBar

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-08T22:42:39.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 21, 2013 Sprint 21 API, Release 3.2.0
ComponentsiOS
Labels3.1.3, module_navbar, qe-closed-3.2.0, qe-manualtest
ReporterSebastien JACQ
AssigneeIngo Muschenetz
Created2013-09-24T09:12:29.000+0000
Updated2014-10-06T23:18:41.000+0000

Description

If you want to emulate the back button in navigation bar and specify both an image and a title for the button, only the image will be displayed. If the button is placed in the window, both the image and title appear. See attached and try in a new alloy project.

Attachments

FileDateSize
index.js2013-09-24T09:12:29.000+0000562
index.xml2013-09-24T09:12:29.000+000058
iOS Simulator Screen shot Sep 24, 2013 11.13.17 AM.png2013-09-24T09:14:34.000+000021343

Comments

  1. Mostafizur Rahman 2013-09-26

    Hello, Can you redefine your test code? Please explain your test code. Thanks
  2. Sebastien JACQ 2013-09-27

    Hi, The test code is doing the following: - Creates a NavigationGroup called [navWindow] and assigns window [rootWin] - Then code opens the window [secondWindow] - For that secondWindow opened in the NavGroup, a simple button [testBtn] is added with both image and title (this one works fine). - For that second window, the backButton property is set to use another button called [backButton] which is defined (just as the other button) with an image and a title. - However, the backButton property works fine because the button is displayed, but only with the image (the title does not appear). If only the title is used for the button mentioned for the backButtonProperty, then the title appears fine. So the issue is that the button is not displayed correctly. Apple mentions that standard back button image can be changed using the "backIndicatorTransitionMaskImage" property but I don't think this has been implemented in Titanium.
  3. Sebastien JACQ 2013-09-30

    Hi, Could you explain why the status has been set to resolved ? Has a correction been made ? Thanks for your assistance.
  4. Mostafizur Rahman 2013-09-30

    Hello [~sjacq], Please check this issues Resolution. Then you can see that is Incomplete. Because, when you create this issue your test code and test case was not clear. That's why I set resolution as Incomplete and Status resolved means not yet closed. I am waiting for you next response. Thanks
  5. Sebastien JACQ 2013-09-30

    Hi, I posted some more explanations on 27th September about what the test code is doing. Could you please tell me if that is sufficient or need more explanation. I'll give more details if need be to help sort out this issue. Cheers
  6. Shak Hossain 2013-09-30

    Sebastien, Apologies for the mixed status here. We have move this issue to our Engineering queue for a review. The new bug number is TIMOB-15381. Please let me know if this is any blocker for your project. We do plan to address all iOS7 related bugs at our earliest. Regards, Shak
  7. Vishal Duggal 2013-10-08

    Expected behavior. The documentation is kind of incomplete on Ti.UI.Button and its behavior when used as a UIBarButtonItem. You could just wrap the button in a regular view and set that to the leftNavButton. Alternative set a backgroundImage on the button so we use it as a custom view object.
       var wrapper = Ti.UI.createView({
           width:Ti.UI.SIZE,
           height:30 //Fits nicely in portrait and landscape
       })
       
       
       var backBtn = Ti.UI.createButton({
           image: "/images/nav_back.png",
           title: "Emulate",
           style:Ti.UI.iPhone.SystemButtonStyle.PLAIN //For good behavior on iOS6
       });
       
       wrapper.add(backBtn);
       secondWindow.leftNavButton = wrapper;
       
  8. Vishal Duggal 2013-10-08

    JS fix in comments
  9. Samuel Dowse 2013-12-02

    Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311262027 Titanium SDK, build: 3.2.0.v20131127194046 CLI: 3.2.0-beta Alloy: 1.3.0-beta Xcode: 5.0.2 Used the code attached to ticket as well as the code in the comments. Back button displays text and image. Main window displays text and image. Closing.

JSON Source