Closed fnxpt closed 10 years ago
What does your CSS look like for the 'even' and 'odd' selector?
.even{border: 1px solid #ff0000;} .odd{border: 1px solid #0000ff;}
I'll investigate. BTW, have you tried using
`
`
Hi again... The css that you described doesn't work.
@fnxpt Not sure about collectionViews but it does work on TableViews (using pseudo selectors that is)
Try doing
#yourCollectionViewCell:nth-child(even) { ... }
#yourCollectionViewCell:nth-child(odd) { ... }
As in put it on the cells and not the collectionView.
I just tried
.ETApplicationTableViewCell {
&:nth-child(odd) {
background-color: $gray-superlight;
}
}
We have a small collection view fix coming, I'll test to see if it resolved your issue by testing your CSS.
-Paul
On Apr 1, 2014, at 7:14 AM, fnxpt notifications@github.com wrote:
Hi again... The css that you described doesn't work.
— Reply to this email directly or view it on GitHub.
Ok, using the latest version, I was albe to use only this code (updateStyles not needed) with your css sample:
int idx = indexPath.section + indexPath.row; [cell setStyleClass: (idx % 2 == 0) ? @"even" : @"odd"];
And got this:
Try this 2.1.3RC2 version (link subject to disappearing): https://www.dropbox.com/s/7bc1embtexvl2t0/PixateFreestyle.framework.zip
@pcolton When do we actually call updateStyles, as in when is it necessary?
I'll write something up soon for when to call and when not to. For cells, no need to in that method as they are styled after that method is called. Generally, styling is done in layoutSubviews so calling updateStyles depends on when your code executes. Also, setting a id or class will cause styling.
-Paul
On Apr 6, 2014, at 12:11 PM, Seivan Heidari notifications@github.com wrote:
@pcolton When do we actually call updateStyles, as in when is it necessary?
— Reply to this email directly or view it on GitHub.
Still having some issues... I have a more complex collectionview that should represent my problem better... https://dl.dropboxusercontent.com/u/1846454/collectionview.mov As you can see its a collectionview with multiple sections and whenever I move to another page the cellForIndexPath is called.. February and March should have only one rounded cell
The issue might be that for the non-circled state, you need to make sure you undo whatever stylings you've set. That is, the cells are being reused, and it looks like their stylings aren't being set back, so make sure your CSS has the inverse of whatever you turned on. If you'd like, you can send your actual CSS for those cells to support at pixate dot com and I can take a look.
When cellForIndexPath is called I reset the styleClass and then apply the new one.
You still need to 'reset' values you have set, iOS has no way of resetting to default values. So anything you have set (i.e. border color) that you want turned off, you need to explicitly set in the alternate style. If you remove the style, you need to instead apply a 'resetting' style.
Thanks.... it worked... Not sure why I was thinking that pixate will reset them for me
We actually looked into a way to 'reset', but there's no API for doing so. We'd have to review each iOS versions' docs and see what the default values are and explicitly set them -- you are better off with a reset css file. It would be nice to start such a file that people could use to get controls back to their default states.
I'm trying to implement pixate on a UICollectionView with different styles, but I'm not getting the correct output. After applying the cell the cell still uses the style previously defined.