Code Monkey home page Code Monkey logo

Comments (13)

bfeher avatar bfeher commented on June 19, 2024

R0CKSTAR, thanks for filing this bug report!
Am I correct in believing that tapping a BFPaperButton/BFPaperTableViewCell pushed a new view on the Navigation Stack?
I'll be investigating this issue this week. Hopefully I can release a fix soon.

from bfpaperbutton.

bfeher avatar bfeher commented on June 19, 2024

Sorry, I have another question:
Are you setting the tap-circle color to that gray? Is that gray to be expected?

from bfpaperbutton.

yeahdongcn avatar yeahdongcn commented on June 19, 2024

I'm using smart color but always select gray, I don't know why. Please also investigate this...

@implementation ZSHPlainButton

- (void)dealloc
{
    NSLog(@"dealloc");
}

+ (instancetype)button
{
    return [[self alloc] initFlat];
}

- (void)action:(id)sender
{
    if (self.click) {
        self.click(sender);
    }
}

- (void)setup
{
    self.cornerRadius = 0;
    self.isRaised = NO;
    self.usesSmartColor = YES;

    [self addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];
}

- (id)init
{
    self = [super init];
    if (self) {
        [self setup];
    }
    return self;
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setup];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        [self setup];
    }
    return self;
}

from bfpaperbutton.

yeahdongcn avatar yeahdongcn commented on June 19, 2024

The last question is YES, pushing a new view controller than swiping back, and the screenshots are taken from intermediate states, when the last view controller receives viewDidAppear, everything goes right.

from bfpaperbutton.

bfeher avatar bfeher commented on June 19, 2024

About the gray color:
If you use smart color, BFPaperButton tries to match the color to self.titleLabel.textColor and BFPaperTableViewCell tries to match the color to self.textLabel.textColor. Are you setting these properties?

Is the circle still gray if you explicitly set the tap-circle color (eg: control.tapCircleColor = [UIColor redColor];) ?

from bfpaperbutton.

yeahdongcn avatar yeahdongcn commented on June 19, 2024

.tapCircleColor = [UIColor redColor]; this will change the circle color.
It could be smarter if considering the background color or background image color or image color for certain state :)

https://github.com/timominous/TDImageColors

from bfpaperbutton.

bfeher avatar bfeher commented on June 19, 2024

I see. Thanks I will take a look and perhaps include the ability to choose where smart color looks to match the circle in the next version.

As for the animation getting paused and resumed by the Navigation Stack transition animations, I really don't know if that is something I can control from the UIButton level. It seems like the animation is performing as expected, but I will continue looking into this.

Thanks.

from bfpaperbutton.

yeahdongcn avatar yeahdongcn commented on June 19, 2024

Thanks for taking time investigating this.

from bfpaperbutton.

bfeher avatar bfeher commented on June 19, 2024

I just confirmed this strange and unwanted behavior:
circle-bug-safe

Will work on a fix for this ASAP.

Thanks again for finding this!

from bfpaperbutton.

yeahdongcn avatar yeahdongcn commented on June 19, 2024

Great, looking forward to your fix, thanks.

from bfpaperbutton.

bfeher avatar bfeher commented on June 19, 2024

Version 1.5.1 fixes the gray layer and circles being left behind and showing up during Navigation Stack transitions, and 1.5.2 is the latest build. Please update and let me know if you find any more bugs, thanks!
(I am rolling the same update to the rest of the BFPaper components today as well.)

I am considering adding options to make Smart Color more smart in the future, thank you :)

from bfpaperbutton.

bfeher avatar bfeher commented on June 19, 2024

BFPaperTableViewCell version 1.2.1 applies the same fix to that library.

from bfpaperbutton.

yeahdongcn avatar yeahdongcn commented on June 19, 2024

Nice, thanks!

from bfpaperbutton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.