Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to adjust cell offset #175

Closed
karmeye opened this issue Nov 2, 2012 · 3 comments
Closed

Possible to adjust cell offset #175

karmeye opened this issue Nov 2, 2012 · 3 comments

Comments

@karmeye
Copy link

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.

@AlanQuatermain
Copy link
Owner

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
Copy link
Author

karmeye commented Nov 2, 2012

Perfect! Thank you!

@karmeye karmeye closed this as completed Nov 2, 2012
@karmeye karmeye reopened this Nov 6, 2012
@karmeye
Copy link
Author

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.

@karmeye karmeye closed this as completed Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants