Git Product home page Git Product logo

pulltomakeflight's Introduction

PullToMakeFlight

Custom animated pull-to-refresh that can be easily added to UIScrollView

Yalantis

Requirements

  • iOS 8.0+
  • Xcode 9
  • Swift 4

Installing with CocoaPods

use_frameworks!
pod 'PullToMakeFlight', '~> 3.0'

Usage

At first, import PullToMakeFlight framework:

import PullToMakeFlight

Create refresher:

let refresher = PullToMakeFlight()

Add the refresher to your UIScrollView subclass and provide action block:

tableView.addPullToRefresh(refresher) {
     // action to be performed (pull data from some source)
}

After the action is completed and you want to hide the refresher:

tableView.endRefreshing()

You can also start refreshing programmatically:

tableView.startRefreshing()

Component was implemented based on customizable pull-to-refresh

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for iOS (Android) better than better. Stay tuned!

License

The MIT License (MIT)

Copyright © 2017 Yalantis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

pulltomakeflight's People

Contributors

dimakomar avatar edbaev avatar ennioma avatar gorbannastya avatar maksym-letiushov avatar mrcompoteee avatar naeemshaikh90 avatar rnkyr avatar serejahh 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

pulltomakeflight's Issues

Crash at initialization

Report

Simultaneous accesses to 0x102a80508, but modification requires exclusive access.
Previous access (a modification) started at PullToRefresh`PullToRefresh.addScrollViewObserving() + 244 (0x1017943e8).
Current access (a modification) started at:
0 libswiftCore.dylib 0x0000000101e75e18 swift_beginAccess + 436
1 PullToRefresh 0x0000000101791c78 PullToRefresh.KVOContext.materializeForSet + 48
2 PullToRefresh 0x0000000101791e20 PullToRefresh.observeValue(forKeyPath:of:change:context:) + 128
3 PullToRefresh 0x00000001017940bc @objc PullToRefresh.observeValue(forKeyPath:of:change:context:) + 500
4 Foundation 0x000000018728a8c0 + 304
5 Foundation 0x00000001872a4418 + 204
6 Foundation 0x00000001872a4240 + 124
7 PullToRefresh 0x00000001017942f4 PullToRefresh.addScrollViewObserving() + 308
8 PullToRefresh 0x000000010178ff78 PullToRefresh.scrollView.didset + 216
9 PullToRefresh 0x00000001017900d8 PullToRefresh.scrollView.setter + 224
10 PullToRefresh 0x000000010179abd0 UIScrollView.addPullToRefresh(_:action:) + 128
11 smsflight 0x00000001006ba3c8 FlightAlertsViewController.viewDidLoad() + 416
12 smsflight 0x00000001006ba758 @objc FlightAlertsViewController.viewDidLoad() + 40
13 UIKit 0x000000018fdc4aec + 1040
14 UIKit 0x000000018fe6c5a0 + 76
15 UIKit 0x000000018fe6b9c8 + 196
16 UIKit 0x000000018fe6b000 + 1168
17 UIKit 0x000000018fe6ae68 + 164
18 UIKit 0x000000018fe6ad50 + 188
19 UIKit 0x000000018fdc1dfc + 1276
20 QuartzCore 0x000000018a97be10 + 184
21 QuartzCore 0x000000018a97fe5c + 332
22 QuartzCore 0x000000018a8ee948 + 336
23 QuartzCore 0x000000018a914c98 + 540
24 QuartzCore 0x000000018a915c98 + 92
25 CoreFoundation 0x0000000186935828 + 32
26 CoreFoundation 0x0000000186933064 + 412
27 CoreFoundation 0x00000001869332b0 + 1292
28 CoreFoundation 0x0000000186853e04 CFRunLoopRunSpecific + 436
29 GraphicsServices 0x00000001886ebf20 GSEventRunModal + 100
30 UIKit 0x000000018fe28218 UIApplicationMain + 208
31 smsflight 0x00000001006c19b0 main + 88
32 libdyld.dylib 0x0000000186376568 + 4

The more information you provide, the faster we can help you.

⚠️ Select what you want - a feature request or report a bug. Please remove the section you aren't interested in.

A feature request

What do you want to add?

Please describe what you want to add to the component.

How should it look like?

Please add images.

Report a bug

What did you do?

Please replace this with what you did.

What did you expect to happen?

Please replace this with what you expected to happen.

What happened instead?

Please replace this with what happened instead.

Your Environment

  • Version of the component: insert here
  • Swift version: insert here
  • iOS version: insert here
  • Device: insert here
  • Xcode version: insert here
  • If you use Cocoapods: run pod env | pbcopy and insert here
  • If you use Carthage: run carthage version | pbcopy and insert here

Project that demonstrates the bug

Please add a link to a project we can download that reproduces the bug.

Grouped style

Hi guys, when I change to Plan styles...works like a charm. do you know what's could I change to archive it?

simulator screen shot 6 jun 2016 09 04 26

warning: Could not find remote branch 1.4.0 to clone. fatal: Remote branch 1.4.0 not found in upstream origin

Zafars-iMac:podinstall ZafarAhmad$ pod install
Analyzing dependencies
Downloading dependencies
Installing PullToMakeFlight (1.1.2)
Installing PullToMakeSoup (1.2)
Installing PullToRefresher (1.4.0)

[!] Error installing PullToRefresher
[!] /usr/bin/git clone https://github.com/Yalantis/PullToRefresh.git /var/folders/89/9pzfjxd50bs5_hy39qqm3m8r0000gn/T/d20160804-2979-vq368o --template= --single-branch --depth 1 --branch 1.4.0

Cloning into '/var/folders/89/9pzfjxd50bs5_hy39qqm3m8r0000gn/T/d20160804-2979-vq368o'...
warning: Could not find remote branch 1.4.0 to clone.
fatal: Remote branch 1.4.0 not found in upstream origin

This is my Podfile

Uncomment this line to define a global platform for your project

platform :ios, '8.0'

inhibit_all_warnings!

target 'podinstall' do

Comment this line if you're not using Swift and don't want to use dynamic frameworks

use_frameworks!

Pods for podinstall

target 'podinstallTests' do
pod 'PullToMakeFlight'
pod 'PullToMakeSoup'

# Pods for testing

end

target 'podinstallUITests' do
inherit! :search_paths
# Pods for testing
end

end

Autolayout Issue Swift

I am having an strange error on swift. Which makes a huge delay on the endRefreshing() animation

2015-10-01 13:19:54.799 Mako[39509:354720] This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.
Stack:(
0   CoreFoundation                      0x00000001118c3f65 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x0000000112889deb objc_exception_throw + 48
2   CoreFoundation                      0x00000001118c3e9d +[NSException raise:format:] + 205
3   Foundation                          0x00000001120dc3b5 _AssertAutolayoutOnMainThreadOnly + 79
4   Foundation                          0x0000000111f3c9d2 -[NSISEngine optimize] + 49
5   Foundation                          0x0000000111f3d294 -[NSISEngine withBehaviors:performModifications:] + 245
6   UIKit                               0x00000001100c8637 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 58
7   UIKit                               0x00000001100c8fb9 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 154
8   UIKit                               0x00000001100c8c29 -[UIView(AdditionalLayoutSupport) _internalUpdateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 309
9   UIKit                               0x00000001100c8fe5 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededAccumulatingViewsNeedingSecondPassAndViewsNeedingBaselineUpdate:forSecondPass:] + 198
10  UIKit                               0x00000001100c961d __60-[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded]_block_invoke + 98
11  UIKit                               0x00000001100c8640 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 67
12  UIKit                               0x00000001100c917a -[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded] + 254
13  UIKit                               0x00000001100c9e8f -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeeded] + 272
14  UIKit                               0x000000010f8e860c -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 159
15  UIKit                               0x000000010f8f8143 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 749
16  QuartzCore                          0x000000011272d36a -[CALayer layoutSublayers] + 146
17  QuartzCore                          0x0000000112721bd0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
18  QuartzCore                          0x0000000112721a4e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
19  QuartzCore                          0x00000001127161d5 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
20  QuartzCore                          0x00000001127439f0 _ZN2CA11Transaction6commitEv + 508
21  QuartzCore                          0x0000000112743cd4 _ZN2CA11Transaction14release_threadEPv + 224
22  libsystem_pthread.dylib             0x00000001136c139c _pthread_tsd_cleanup + 470
23  libsystem_pthread.dylib             0x00000001136c0f78 _pthread_exit + 117
24  libsystem_pthread.dylib             0x00000001136bf596 pthread_attr_getschedpolicy + 0
25  libsystem_pthread.dylib             0x00000001136bd375 start_wqthread + 13 )

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.