Giter Site home page Giter Site logo

amwavetransition's Introduction

👋 Hey

I'm an iOS and Web developer, currently working at Fancy Pixel and as a freelancer. I mainly work with Swift (you'll find a bunch of iOS libraries used by many in my repos), but also work a lot with React for the web. Once I close my laptop I get into my workshop for some hand tools woodworking 🔨

Get in touch

Want to collaborate on a new OSS project? Don't hesitate to contact me. I'm also available for freelance work on iOS.

✉️

amwavetransition's People

Contributors

andreamazz avatar bryant1410 avatar futuretap avatar markst avatar readmecritic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amwavetransition's Issues

Swipe Gesture

Is it possible to reactive swipe gesture on this transition ?

Added some changes

Hey,

I added some changes in my fork of your wonderful project

voznesenskym/AMWaveTransition@andreamazz:master...master

I was hoping to do a bit of cleanup by removing some of the if-else ambiguity, and changed some defines to statics.

I also gave the user the ability to access the transition style directly, which I thought could perhaps help this grow into something more expansive. If you want it to just stay a wave thats cool too.

If you are interested let me know, and ill add my changes.

Michael

Crash on Swift Project

Hi Andrea,
I'm having problems implementing AMWaveTransition on a Swift project - iOS 8 - Xcode 6.

The crash message is: -[__NSArrayI setTransform:]: unrecognized selector sent to instance 0x7fba99c5d930

the crash occurs in this method on the line: [view setTransform:CGAffineTransformMakeTranslation(delta, 0)];

Any help with this error and implementing in Swift would be greatly appreciated.

Thanks
Rob

- (void)hideView:(UIView *)view withDelay:(NSTimeInterval)delay andDelta:(float)delta
{
    void (^animation)() = ^{
        [view setTransform:CGAffineTransformMakeTranslation(delta, 0)];
        [view setAlpha:0];
    };
    void (^completion)(BOOL) = ^(BOOL finished){
        [view setTransform:CGAffineTransformIdentity];
    };
    if (self.transitionType == AMWaveTransitionTypeSubtle) {
        [UIView animateWithDuration:self.duration delay:delay options:UIViewAnimationOptionCurveEaseIn animations:animation completion:completion];
    } else if (self.transitionType == AMWaveTransitionTypeNervous) {
        [UIView animateWithDuration:self.duration delay:delay usingSpringWithDamping:0.75 initialSpringVelocity:1 options:UIViewAnimationOptionCurveEaseIn animations:animation completion:completion];
    } else if (self.transitionType == AMWaveTransitionTypeBounce){
        [UIView animateWithDuration:self.duration delay:delay options:UIViewAnimationOptionCurveEaseInOut animations:animation completion:completion];
    }
}

To VC sometimes jumps on display before animating.

Sometimes navigating back through nav stack will flash present the 'toVC' view before animating it into display, which produces a nasty jumpiness.

A resolution seems to triggering a layout before performing the seemingly necessary animation to load visible cells.

    // Move the destination in place
    toVC.view.frame = [transitionContext finalFrameForViewController:toVC];
    // And kick it aside
    toVC.view.transform = CGAffineTransformMakeTranslation(delta, 0);

    [transitionContext containerView].backgroundColor = fromVC.view.backgroundColor;

    [[transitionContext containerView] layoutIfNeeded];

    // First step is required to trigger the load of the visible cells.
    [UIView animateWithDuration:0 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{} completion:^(BOOL finished) {

Multiple tableviews in one VC/Class

I have a view controller with two UITableViews, the VC is currently acting as the delegate/dataSource for both UITableViews. Is there any way to conditionally return the correct NSArray of visibleCells?

I am aware the correct way to do it would be to have separate delegate/dataSource classes for the second UITableView but I want to know if it is possible without doing this? Thanks!

Swift compatibility

Ciao Andrea!

I was thinking about trying implement this on a swift project. Checking around , i wasn't able to get a swift version, or get if there s one.
Is it possible integrate this into a swift project?

PS Effetto pulito e molto bello

Is a transparent background of table view a must if this wave can work?

Your sample is great! I leverage it in my app, which looks good! Thank you!

Tried non-transparent backgrounds of two UITableView, when transition, it looks weird. The background is moving slower than table view when back to the first level table view from the second level. Do you found that? Or, is anything wrong or I missed?

Issues with translucent navigation bar

The interactive pop gesture positions the visible cells wrong when using the translucent navigation bar. In my project the cells are being positioned where the navigation bar should be when the gesture is pending and when it completes they move to their correct positions, but in your Demo project they are also positioned at the wrong coordinates.

Is there any quick fix for this?

ios simulator screen shot 09 07 2014 02 56 39
ios simulator screen shot 09 07 2014 02 56 51
ios simulator screen shot 09 07 2014 02 56 59

Crash while trying to swipe on table cell

Your anim is really cool, I love its and would like to integrate into my project. Everything is ok, but while I trying to swipe quickly on table view cell, it crash. Here is the log and screenshot

screen shot 2014-10-18 at 11 16 34 pm

Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 4294967295 beyond bounds [0 .. 0]'
*** First throw call stack:
(
    0   CoreFoundation                      0x01476df6 __exceptionPreprocess + 182
    1   libobjc.A.dylib                     0x01100a97 objc_exception_throw + 44
    2   CoreFoundation                      0x0135a1b2 -[__NSArrayI objectAtIndex:] + 210
    3   CoreFoundation                      0x013c5538 -[NSArray objectAtIndexedSubscript:] + 40
    4                               0x00076562 -[AMWaveTransition handlePan:] + 562
    5   UIKit                               0x01c65d27 _UIGestureRecognizerSendActions + 327
    6   UIKit                               0x01c645a4 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 561
    7   UIKit                               0x01c665ed -[UIGestureRecognizer _delayedUpdateGesture] + 60
    8   UIKit                               0x01c69f6a ___UIGestureRecognizerUpdate_block_invoke661 + 57
    9   UIKit                               0x01c69e2d _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 317
    10  UIKit                               0x01c5dd36 _UIGestureRecognizerUpdate + 3720
    11  UIKit                               0x0187971b -[UIWindow _sendGesturesForEvent:] + 1356
    12  UIKit                               0x0187a57f -[UIWindow sendEvent:] + 769
    13  UIKit                               0x0183faa9 -[UIApplication sendEvent:] + 242
    14  UIKit                               0x0184f8de _UIApplicationHandleEventFromQueueEvent + 20690
    15  UIKit                               0x01824079 _UIApplicationHandleEventQueue + 2206
    16  CoreFoundation                      0x0139a7bf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    17  CoreFoundation                      0x013902cd __CFRunLoopDoSources0 + 253
    18  CoreFoundation                      0x0138f828 __CFRunLoopRun + 952
    19  CoreFoundation                      0x0138f1ab CFRunLoopRunSpecific + 443
    20  CoreFoundation                      0x0138efdb CFRunLoopRunInMode + 123
    21  GraphicsServices                    0x0480224f GSEventRunModal + 192
    22  GraphicsServices                    0x0480208c GSEventRun + 104
    23  UIKit                               0x01827e16 UIApplicationMain + 1526
    24  Funclip                             0x0002c7ad main + 141
    25  libdyld.dylib                       0x0319dac9 start + 1
    26  ???                                 0x00000001 0x0 + 1
)

Hope you can take a look and fix
Thank

Transition between View Controllers issue

In my app, I have a couple of View Controllers each with a tableview as well as a HeaderView. the transition in the cells work well but the header views don't animate well. For example, both header views are visible during the transition before the initial header view animates out. This is not good.

The reason I use a View Controller with subviews (tableview and header view) instead of a tableview controller is for ad banner support. The ads are difficult to control with the tableview controller.

Any ideas on how I should handle the header view animations - I'd really like to use this library in my upcoming app. Thank you.

the background of next view controller turns to be disappeared

please refer to this gist, https://gist.github.com/i0sdev/475262e6de902fd9bca8

I found this when after updating to 0.5.3.

The issue is:

i.e., there two view controllers, the first one (table view) is using AMWaveTransition, tap any cells then push to the second view controller, a normal view controller not table view as a simple sample.

set background color for the second one, like gray or any.

run the sample, show the first one view controller correctly, tap and then show the second one, but found the background that's supposed to be gray color disappears instead.

I downgraded it to 0.5.2, it shows as expected, the gray background on the second view controller.

Why?

UINavigationControllerOperationPop delta for fromVC

I noticed on my pop animations, the cells of the fromVC were animating properly, however the superview was animating backwards (to the left), when it was supposed to be animating to the right.

I finally narrowed down that on line 414, I was able to fix the issue by changing:

[fromVC.view setTransform:CGAffineTransformMakeTranslation(delta, 0)];

to:

[fromVC.view setTransform:CGAffineTransformMakeTranslation(0, 0)];

I'm not sure if that is a bug, or if it was intended to be that way, but with the change I made, the animation looks a lot cleaner.

Can you let me know if I made a proper change, or if I potentially screwed something else up in doing this change?

Thanks for the great work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.