Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Possible to adjust cell offset #175

Open
karmeye opened this Issue Nov 2, 2012 · 3 comments

Comments

Projects
None yet
2 participants

karmeye commented Nov 2, 2012

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.

Owner

AlanQuatermain commented Nov 2, 2012

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 notifications@github.com 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.

karmeye commented Nov 2, 2012

Perfect! Thank you!

@karmeye karmeye closed this Nov 2, 2012

@karmeye karmeye reopened this Nov 6, 2012

karmeye commented Nov 6, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment