Lnpopupcontroller: Changing popup bar background color makes title and subtitle disappear

Created on 22 Aug 2017  路  9Comments  路  Source: LeoNatan/LNPopupController

Description

Changing the popup bar background color, either by changing the tab bar bartintcolor or by popup bar barTintColor, makes the title and subtitle disappear from view. Although both left and right buttons stay visible and working normally.

Steps to Reproduce

Set PopupBar Custom barTintColor after setting any title or subtitle that was visible

playerController.popupItem.subtitle = track.artistName (subtitle still visible)
tabBarController?.popupBar.barTintColor = UIColor.red (after this line, bar background turns red, and subtitle disappear)

not a bug

All 9 comments

Thanks for reporting. I will take a look soon.

Unfortunately, I am unable to reproduce this issue.

Here is how I am testing. In FirstViewController.m, under _presentBar:, I made the following change after presentation:

[targetVC presentPopupBarWithContentViewController:demoVC animated:YES completion:^{
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        demoVC.popupItem.title = [LoremIpsum sentence];
        demoVC.popupItem.subtitle = [LoremIpsum sentence];

        [targetVC.popupBar setBarTintColor:[UIColor redColor]];
    });
}];

This works as expected.

Strange...i have tested using the exact same code as you did there, and still happens the same thing. I can see the title and subtitle being set, and when the bar changes its color, they both disappear. One thing i noticed, is that if i print both labels, they show that the labels are populated with the correct text. Don't know how to proceed to investigate more, any advise? (maybe the labels are getting behind other objects?!

Use the View Inspector in Xcode to see what鈥檚 going on.

Good tip! I'm uploading the results. Apparently, when i set the background color, the UIVisualEffectView that contains both labels, disappear from hierarchy. Removing the line where i set the background color, maintains the UIVisualEffectView alongside the labels.

captura de tela 2017-08-28 as 21 56 14
captura de tela 2017-08-28 as 21 59 38

What OS are you testing on? What version of Xcode?

Also, make sure you are using the latest framework version.

Yeah, that was the problem. I had the iOS and Xcode updated, but not the framework. Problem solved, now its working! Thanks for your time and help!!

Great.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

funkenstrahlen picture funkenstrahlen  路  3Comments

chauhan130 picture chauhan130  路  8Comments

johnswifttt picture johnswifttt  路  5Comments

user3587412 picture user3587412  路  4Comments

iKushalManiyar picture iKushalManiyar  路  4Comments