AQGridView icon indicating copy to clipboard operation
AQGridView copied to clipboard

Can't set separator color

Open funkyboy opened this issue 14 years ago • 3 comments

tried both

gridView.separatorColor = [UIColor redColor] [gridView setSeparatorColor: [UIColor redColor]]

No luck. Also tried the same in your ImageDemo, but no luck again.

funkyboy avatar Oct 21 '10 10:10 funkyboy

Temporarily solved by modifying default value in UIColor+AQGridView

funkyboy avatar Oct 21 '10 10:10 funkyboy

The problem is that - (void) setSeparatorColor: (UIColor *) color method inAGGridView is called before any visible cells are added to _visibleCells. When it is called again, the color is the same so the method is just returned. As a result the separator color is never set on the cell.

Not sure of the most elegant solution to fix this. Alan?

wuf810 avatar Apr 01 '11 18:04 wuf810

You can do a custom subclass of AQGridViewCell. Import "AQGridViewCell+AQGridViewCellPrivate.h". Then in your initialization code you can do a : self.separatorColor = [UIColor redColor]; It works but use private API...

nverinaud avatar Aug 11 '11 06:08 nverinaud