Code Monkey home page Code Monkey logo

bfpapertableviewcell's People

Contributors

bfeher avatar bryant1410 avatar eithanshavit avatar readmecritic avatar yeahdongcn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bfpapertableviewcell's Issues

Remove NSLog statement in line 371

I think with your last update you forgot to remove or comment out a NSLog statement. I get this frequently in my log:

tapCircleDiameterStartValue = '375.00'

Rounded corners on table cell

I have subclassed BFPaperTableViewCell and applied rounded corners in drawRect:

UIBezierPath(roundedRect: rect, byRoundingCorners: UIRectCorner.AllCorners, cornerRadii: CGSizeMake(2, 2)).fill()

The problem is that the ripple effect fills the entire cell and removes the rounded corners. Any idea how to solve this? @bfeher

Bug: v1.3.0, app crashes on fast table scroll

*** Terminating app due to uncaught exception 'NSRangeException', reason: 
'*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'

happens only in version 1.3.0

Issues drawing a custom border

@bfeher hello again :)

I have a problem drawing a bottom border in my subclassed BFPaperTableViewCell:

override func drawRect(rect: CGRect) {

    if self.drawBorder {    
        var context = UIGraphicsGetCurrentContext()
        CGContextMoveToPoint(context, CGRectGetMinX(rect), CGRectGetMaxY(rect))
        CGContextAddLineToPoint(context, CGRectGetMaxX(rect), CGRectGetMaxY(rect))
        CGContextSetStrokeColorWithColor(context, UIColor(netHex: 0xEFEEF4).CGColor)
        CGContextSetLineWidth(context, 2)
        CGContextStrokePath(context)
    }
}

this works. But as soon as I touch the cell the border disappears. Do you have any idea how to fix this?

Bug: v1.3.0 coloring removed when using UISearchBar

Just noticed, it broke with the update from 1.2.3 -> 1.3. I have a UISearchBar above the table view. When I tap on the search bar the BFPaperTableViewCell colors are removed and default to gray. I don't have this problem with version 1.2.3, only with 1.3

github

Segue back and deselect cell animation like in default UITableViewCell

Using UITableViewCell you get this effect when you first click on a cell, segue to another view and move back again. The cell is still selected and the selection state fades out animated. You can see it in the iPhone Settings app very clearly.

I noticed that BFPaperTableViewCell is not behaving that way. Are there plans to implement that?

Warning: assigning incompatible type

Have 2 warnings:

Warning:(396, 39) assigning to 'id<CAAnimationDelegate> _Nullable' from incompatible type 'BFPaperTableViewCell *const __strong'

It seems that BFPaperTableViewCell () is missing conform to CAAnimationDelegate, so it might be pretty straightforward fix.

PS: in BFPaperCheckbox it seems to be already fixed

[Improvement] The view should complete the fade in and growth animations before fading out.

I've implemented a fix myself, and it looks a lot better! It can be easily accomplished by adding a void block property to the class and queuing the removeBackground and removeCircle animations to be called in animationDidStop::

@property (nonatomic, copy) void (^removalAnimationsQueue)();
...
if (self.removalAnimationsQueue) {
    self.removalAnimationsQueue()
    self.removalAnimationsQueue = nil;
}

For example, in setSelected:animated:, the if (!selected) statement can be modified like so:

if (!selected) {
    if (!self.growthFinished) {
          // Not done yet, queue removeBackground call

          void (^oldBlock)() = self.removalAnimationsQueue;
          __weak typeof(self) weakSelf = self;

          self.removalAnimationsQueue = ^void() {
               if (oldBlock)
                    oldBlock();
               [weakSelf removeBackground];
        };
    }
    else {
        [self removeBackground];
    }
}

And in touchesEnded:withEvent:...

if (self.growthFinished) {
    [self removeCircle];
}
else {
     // Not done yet, queue removeCircle call

     __weak typeof(self) weakSelf = self;
     void (^oldBlock)() = self.removalAnimationsQueue;

     self.removalAnimationsQueue = ^void() {
          if (oldBlock)
               oldBlock();
          [weakSelf removeBackground];
    };
}

And that should do it. :)

Bug in cell animation

I was using v1.3.1 in my custom table view cell without any problem like this:

self.usesSmartColor = false
self.tapCircleColor = UIColor(netHex: 0xff95bc)
self.backgroundFadeColor = UIColor(netHex: 0xff95bc)
self.letBackgroundLinger = true

Now I upgraded to 2.1.17 and there is a problem. When you tap on a cell it animates like expected, then the circle disappears. Instead the cell's background color is now completely covered by tapCircleColor.

Just as a tip, to help trace down such problems it is good practice to maintain a CHANGELOG.md and list changes as well as breaking changes in your code.

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.