AQGridView
AQGridView copied to clipboard
Possible to adjust cell offset
Is it possible to adjust each individual cell's position?
I have a shelf background, and the items are not properly aligned to the shelves. The cell items are of different sizes.
Thanks.
Absolutely: implement the -(CGRect)gridView:adjustCellFrame:withinGridCellFrame: method in your AQGridViewDelegate. That is passed the CGRect for the cell's default frame along with the CHRect of the logical bounding box within which it is by default centered. Assuming your shelf sits N pixels above the bottom of the grid, you can just adjust the default frame so it's bottom sits N pixels above the bottom of the bounding box.
This is actually the exact same case for which the method was originally created: laying out books on the Kobo app's shelf view.
Sent from my iPhone
On 2012-11-02, at 11:51 AM, rassol [email protected] wrote:
Is it possible to adjust each individual cell's position?
I have a shelf background, and the items are not properly aligned to the shelves. The cell items are of different sizes.
Thanks.
Reply to this email directly or view it on GitHub.
Perfect! Thank you!
Is there support for different sizes of cellFrames? When I adjust the cellFrame according to the cell image size the spring board example stops working when moving cells.