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

Initial support for iOS4 #8

Closed
wants to merge 10 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

steipete commented Dec 12, 2011

… while using iOS5 features when possible. (uses weak when available)
There are still some problems with getting the Gesture Recognizers and changing layout strategy doesn't work yet, but it's a start.

Plus, this fixes a missing subclass from NSObject in GMGridViewLayoutStragegyFactory, which works for iOS5 but crashes with runtime problems in NSInvocation in iOS4.

@steipete steipete Add initial support for iOS4
… while using iOS5 features when possible. (uses weak when available)
There are still some problems with getting the Gesture Recognizers and changing layout strategy doesn't work yet, but it's a start.

Plus, this fixes a missing subclass from NSObject in GMGridViewLayoutStragegyFactory, which works for iOS5 but crashes with runtime problems in NSInvocation in iOS4.
1ffd57f
Owner

gmoledina commented Dec 13, 2011

Great! Thank you very much.
Defining the gm_weak is a very elegant solution.

About the gesture recognizer, I fixed it by changing your code this way :

for (UIGestureRecognizer *gestureRecognizer in _scrollView.gestureRecognizers)
{
if ([gestureRecognizer isKindOfClass:NSClassFromString(@"UIScrollViewPanGestureRecognizer")])
{
panGestureRecognizer = (UIPanGestureRecognizer *) gestureRecognizer;
break;
}
}

Works fine now.

I'll look into the layout strategy issue that you mentioned, although it seems to be working fine.

I already pulled your code on my local repo. I'll do some more testing and push it on github in a few days.

Thanks again!

steipete added some commits Dec 13, 2011

@steipete steipete Fixes issue #9 with recognizing taps while scrolling
Also exposes scrollView (as this is *really* useful sometimes)
Also adds UIViewAnimationOptionAllowUserInteraction for iOS4, so that animations don't block the whole user interface.
7856796
@steipete steipete actually expose prepareForReuse so it can be overridden 4a24419
@steipete steipete removes expensive animation blocks in scroll delegate.
Speeds up scrolling and fixes Issue #13.
02a9ab5
@steipete steipete renames and exposes cellForItemAtIndex (was: itemSubViewForPosition) 2c8782b
@steipete steipete try to restore previous contentOffset after a reloadData
This matches expected behavior; e.g. UITableView works the same.
We're still checking if the offset is acceptable with min/max values.
9c62a27
@steipete steipete add UIKit reference - not everyone has UIKit within the precompiled h…
…eaders
4e0f6e9
@steipete steipete add special preprocessor flag to suppress the usage of __weak.
This is sometimes needed when you build ARCified libraries but don't want libarclite.so added automatically.
3071867
@steipete steipete don't flash scroll indicators while scrolling.
This fixes both slowness and the vanishing scroll indicator problem on iOS4.
It's also on IOS5 no good idea, but Apple seems to have fixed the vanishing indicator issue there.
834c855
@steipete steipete adds a fade animation on rotation (as Springboard does) 19ae1aa
Owner

gmoledina commented Dec 15, 2011

Merged

@gmoledina gmoledina closed this Dec 15, 2011

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