Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A UINavigationBar extension to show loading effects

License

NotificationsYou must be signed in to change notification settings

gmertk/BusyNavigationBar

Repository files navigation

VersionLicensePlatform

A UINavigationBar extension to show loading effects above navigation bar's background.

Screenshot

Stripes

gray_stripe.gifblue_stripe2.gif

Bars

gray_bar.gifgreen_bar.gif

Your custom layer

gray_bird.gif

Usage

BusyNavigationBar is available throughCocoaPods. To installit, simply add the following lines to your Podfile:

use_frameworks!pod"BusyNavigationBar"

Or add the following lines to your Cartfile:

github"gmertk/BusyNavigationBar""master"

After installation is done, you can use the new methods of your navigation bar;start(_ options: BusyNavigationBarOptions) andstop().

Properties

varoptions=BusyNavigationBarOptions()/**    Animation type    - Stripes: Sliding stripes as seen in Periscope app.    - Bars: Bars going up and down like a wave.    - CustomLayer(() -> CALayer): Your layer to be inserted in navigation bar. In this case, properties other than `transparentMaskEnabled` and `alpha` will not be used. */options.animationType=.Stripes/// Color of the shapes. Defaults to gray.options.color=UIColor.grayColor()/// Alpha of the animation layer. Remember that there is also an additional (constant) gradient mask over the animation layer. Defaults to 0.5.options.alpha=0.5/// Width of the bar. Defaults to 20.options.barWidth=20/// Gap between bars. Defaults to 30.options.gapWidth=30/// Speed of the animation. 1 corresponds to 0.5 sec. Defaults to 1.options.speed=1/// Flag for enabling the transparent masking layer over the animation layer.options.transparentMaskEnabled=true// Start animationself.navigationController?.navigationBar.start(options)// Stop animationself.navigationController?.navigationBar.stop()

Author

Günay Mert Karadoğan,mertkaradogan@gmail.com

License

BusyNavigationBar is available under the MIT license. See the LICENSE file for more info.

More

There isa nice tutorial about Periscope's pull-to-refresh control by @bitwaker.

About

A UINavigationBar extension to show loading effects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp