Horizontal and vertical item spacing #52

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
@brotherbard

I separated the item spacing into horizontal and vertical to allow for better layout customization.

@steipete

This comment has been minimized.

Show comment
Hide comment
@steipete

steipete Feb 28, 2012

Looks good! Only thing I'm asking myself is if we should still use spacing as a parameter and CGSize for width/height instead of two parameters.

Looks good! Only thing I'm asking myself is if we should still use spacing as a parameter and CGSize for width/height instead of two parameters.

@brotherbard

This comment has been minimized.

Show comment
Hide comment
@brotherbard

brotherbard Feb 28, 2012

I created separate properties because I don't think of the spacing as a size and didn't want to overload CGSize to mean something else. But if people prefer it as CGSize I'll change it.

Also, as I've been playing with the spacing I think I want to change it based on portrait or landscape. The margins as well. I'm currently abusing GMGridView:sizeForItemsInInterfaceOrientation: to change these settings but maybe there should be a separate delegate call for that. And I'm not sure if it should be the data source delegate so a new layout delegate? Any preferences? Or is that the correct place to change things.

I created separate properties because I don't think of the spacing as a size and didn't want to overload CGSize to mean something else. But if people prefer it as CGSize I'll change it.

Also, as I've been playing with the spacing I think I want to change it based on portrait or landscape. The margins as well. I'm currently abusing GMGridView:sizeForItemsInInterfaceOrientation: to change these settings but maybe there should be a separate delegate call for that. And I'm not sure if it should be the data source delegate so a new layout delegate? Any preferences? Or is that the correct place to change things.

@gmoledina

This comment has been minimized.

Show comment
Hide comment
@gmoledina

gmoledina Apr 17, 2012

Owner

I really don't think we should handle this level of detail for the spacing as it will get hard to manage. Later we might even need different spacing per orientation too, and it just gets too much.

I suggest the grid only handles the minimum and the when creating the cell, you can play with your own subviews and layers and add more spacing if required.

Owner

gmoledina commented Apr 17, 2012

I really don't think we should handle this level of detail for the spacing as it will get hard to manage. Later we might even need different spacing per orientation too, and it just gets too much.

I suggest the grid only handles the minimum and the when creating the cell, you can play with your own subviews and layers and add more spacing if required.

@dibsme

This comment has been minimized.

Show comment
Hide comment
@dibsme

dibsme Jan 2, 2013

Thanks. It works charm.

dibsme commented Jan 2, 2013

Thanks. It works charm.

@morteza2128

This comment has been minimized.

Show comment
Hide comment
@morteza2128

morteza2128 May 13, 2013

Thanks alOOOt
Horizontal and vertical item spacing were necessary !

Thanks alOOOt
Horizontal and vertical item spacing were necessary !

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