Comments (15)
Yep, i want this too. Shouldn't be that hard (as compared to section headers)
from gmgridview.
Just one header for the entire grid (with the benefit of scrolling with the grid content) or header per section ?
from gmgridview.
I also needed support for a grid header view. I added it to my fork:
aquarius@65d43a8
from gmgridview.
It only seems to make sense for the Vertical Strategy. Looks weird for Horizontal strategies, specially the paged ones.
from gmgridview.
Right, you probably need to attach it to the grid view directly if you have paging enabled so it always stays on top.
How would you solve this? Add a BOOL to the layout strategy to indicate how the header/footer views are positioned (sticky or scrolling)?
from gmgridview.
I'm also very interested in the header view; we can add simple support for now and improve it with different layouts later.
Any opposition to that?
from gmgridview.
Sure no problem. I was thinking of a solution in the same direction as the layout strategy idea; as in giving the user control on how to position the header. So the core code doesn't has no logic about specifics headerView positioning behavior.
I like Markus's implementation of the headerview, that could be the headerViewContainer. And then the user can set any other view responding to a protocol with callbacks for when the scroll is scrolled for example, so the user can choose the reposition it's own headerView if needed.
The method to set the headerView could be setHeaderView:withSuggestedSize:
In the case of vertical layout, the headerView width will be that of the scroll frame and the height will be the above specified parameter. In the case of horizontal layout, the height will be that of the scroll frame and the width will be the above specified parameter.
What do you think? Is it overkill ?
from gmgridview.
I'm interested in the addition of this API, too.
from gmgridview.
+1 !
from gmgridview.
I'm adding a header for the whole Grid in interface builder, and using setMinEdgeInsets: to shift the grid content down. This would work great except cells are dequeued & removed from the view prematurely when scrolling up (about 1 grid row distance). Thoughts? Am I using setMinEdgeInsets incorrectly?
from gmgridview.
Figured this out: When calculating out the rows to display, the vertical layout strategy doesn't take into account the minEdgeInsets. I changed line 225 in GMGridViewLayoutStrategies to:
CGFloat firstRow = MAX(0, (int)((contentOffset.y - self.edgeInsets.top) / itemHeight) - 1);
from gmgridview.
+1
Any updates on this? Would really love to (easily) add a header view in vertical mode.
from gmgridview.
andrewtheis, fantastic catch on the layout strategy. aquarius branch + your fix made everything work :)
from gmgridview.
Did anyone ever implement this? I was hopping to included a searchbar at the top of the grdiview. So when you pull down it appears (like in mail).
from gmgridview.
+1
I'm interested in this too.
from gmgridview.
Related Issues (20)
- How can items drag in both the directions Left to Right and Right to Left ?
- GMGridView reloadData does not refresh view
- Archives has does not contain a single–bundle application or contains multiple products
- iOS 7 Horizontal strategy content size HOT 2
- No document about how to use this control
- if cell width is quite different, grid will show wrong cell when rotating
- ios 5.1 and lower issue HOT 1
- Grid cell want to draw from top HOT 1
- scrollToObjectAtIndex is not working properly when paging is enabled HOT 1
- memory problem - not released/reclaimed HOT 1
- another mem issue
- GMGrid Cell Alignment Issue
- Image stuck on screen
- Sort Help required!
- gridview.edit=yes,how to use sortingdelegate?
- index = -2147483648
- Maybe you can join a group function
- Button not working in subview GMGridviewCell
- Image link in README.md is broken
- animation repeat count doesn't work in GMGridViewCell
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmgridview.