All Projects → KaoruMuta → IGStoryButtonKit

KaoruMuta / IGStoryButtonKit

Licence: MIT license
IGStoryButtonKit provides an easy-to-use button with rich animation and multiple way inspired by instagram story/stories.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to IGStoryButtonKit

instagram-stories
Get the Instagram Stories in Node.js and Browser
Stars: ✭ 86 (+177.42%)
Mutual labels:  instagram, story
Skeletonview
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Stars: ✭ 10,804 (+34751.61%)
Mutual labels:  instagram, ios-animation
Instagram-Scraper-2021
Scrape Instagram content and stories anonymously, using a new technique based on the har file (No Token + No public API).
Stars: ✭ 57 (+83.87%)
Mutual labels:  instagram, instagram-stories
Tkswitchercollection
An animation switch collection
Stars: ✭ 877 (+2729.03%)
Mutual labels:  uikit, ios-animation
Instaloader
Download pictures (or videos) along with their captions and other metadata from Instagram.
Stars: ✭ 3,655 (+11690.32%)
Mutual labels:  instagram, instagram-stories
Downloadbutton
Customizable App Store style download button
Stars: ✭ 1,532 (+4841.94%)
Mutual labels:  uikit, ios-animation
Ohcubeview
A UIScrollView subclass inspired by the Instagram Stories cube animation
Stars: ✭ 48 (+54.84%)
Mutual labels:  instagram, uikit
Tkrubberindicator
A rubber animation pagecontrol
Stars: ✭ 1,337 (+4212.9%)
Mutual labels:  uikit, ios-animation
Rhplaceholder
Show pleasant loading view for your users 😍
Stars: ✭ 238 (+667.74%)
Mutual labels:  instagram, ios-animation
Pixel
📷 A composable image editor using Core Image and Metal.
Stars: ✭ 2,495 (+7948.39%)
Mutual labels:  instagram, uikit
Zuck.js
A javascript library that lets you add stories EVERYWHERE.
Stars: ✭ 3,396 (+10854.84%)
Mutual labels:  instagram, story
IGStoryKit
A simple and super fast framework to post to Instagram stories from your iOS and iPadOS apps
Stars: ✭ 54 (+74.19%)
Mutual labels:  instagram, instagram-stories
Instagramactivityindicator
Activity Indicator similar to Instagram's.
Stars: ✭ 138 (+345.16%)
Mutual labels:  instagram, uikit
AutoFetcher-IG-Stories-to-GDrive
A Google Apps Script for deploying a web application that automatically fetches the latest available IG Stories of a target Instagram user to your Google Drive.
Stars: ✭ 54 (+74.19%)
Mutual labels:  instagram-stories, instagram-story
MyIGBot
MyIGBot is a Private API for Instagram to like, follow, comment, view & intaract with stories, upload post & stories, get all information about a user/posts and get posts based on locations/hashtags. It also supports proxy.
Stars: ✭ 137 (+341.94%)
Mutual labels:  instagram, story
instagram-post-scheduler
Python Program To Schedule Your Instagram Posts
Stars: ✭ 30 (-3.23%)
Mutual labels:  instagram
instragram-follow
Automatically follow Instagram accounts
Stars: ✭ 23 (-25.81%)
Mutual labels:  instagram
CollectionLayouts
A collection of UICollectionViewLayouts
Stars: ✭ 64 (+106.45%)
Mutual labels:  instagram
XamCall
XamDesign Xamarin Forms Call screen Ui Design
Stars: ✭ 25 (-19.35%)
Mutual labels:  uikit
iphonepip
PiP (Picture in Picture) prototype for iPhone
Stars: ✭ 15 (-51.61%)
Mutual labels:  uikit

Swift-version CocoaPods Carthage License

Introduction

Have you ever seen UI like instagram story, haven't you? Actually, features like instagram story have been implemented in many applications recently.

In order to implement these features like instagram story or rich UI quickly, IGStoryButtonKit provides an easy-to-use button so called IGStoryButton with rich animation and multiple way inspired by instagram story.

Usage and Example

Display Type

IGStoryButton has four display types; seen, unseen, status, none as the part of IGStoryButton.DisplayType. (status has two type; one is set color as an argument, the other is set image as an argument.) The appearance of IGStoryButton depends on these display types.

Color Type

Circle ring which surrounds IGStoryButton has four color types: default, black, clear, custom as the part of IGStoryButton.ColorType.

default black clear custom(colors:)
actual value [UIColor.systemPink, UIColor.orange] [UIColor.black, UIColor.lightGray] [UIColor.clear] value set in argument

Appearance by specific display and color types

The detail is as follows. Once you only set DisplayType, color of outside circle ring is automatically set as default color for the first time.

seen unseen status(color:) status(image:) none
appearance
default color ColorType.black ColorType.default ColorType.clear ColorType.clear ColorType.clear

Customize Color and Image

You can customize which color is set to circle ring, status view in the lower right named in statusView after that and which image is set to status as follows. If you configure display and color type of IGStoryButton, you first import IGStoryButtonKit and set value to the property named condition derived from IGStoryButton.TypeCondition consisted of IGStoryButton.DisplayType, IGStoryButton.ColorType.

Please refer to these codes, comments and implementation of sample app named in ExampleApp.

// import this module
import IGStoryButtonKit

// storyButton: instance after initialization via code or interface builder
// set displayType as .seen, and default color is set to color of circle ring because colorType is not set specifically 
storyButton.condition = .init(display: .seen)
// same thing with above
storyButton.condition = IGStoryButton.TypeCondition(display: .seen)

// if you set color to statusView, you set StatusView.DisplayType.color(of:) as type and specific color as UIColor in the argument of StatusView.DisplayType.color
storyButton.condition = .init(display: .status(type: .color(of: UIColor.green)))

// if you set image to statusView, you set StatusView.DisplayType.image(of:) as TypeCondition.DisplayType and specific image as UIImage in the argument of StatusView.DisplayType.image
storyButton.condition = .init(display: .status(type: .image(of: UIImage(named: "ramen"))))

// if you customize color of circle ring, you set ColorType.custom(colors:) in the argument as TypeCondition.ColorType and set the specific array consisted of UIColor to the argument of ColorType.custom
storyButton.condition = .init(display: .status(type: .color(of: UIColor.green)), color: .custom(colors: [UIColor.cyan, UIColor.yellow, UIColor.gray]))

Indicator Manipulation

You can manipulate whether circle ring performs like activity indicator or not. If you want to start loading, execute startAnimating(speed:, alpha:). Besides, if you want to stop loading, execute stopAnimating.

// storyButton: instance after initialization via code or interface builder
// if you want to set rotation speed and alpha of button, set these in argument of startAnimating(speed:, alpha):
storyButton.startAnimating() // speed: 0.2, alpha: 0.7
storyButton.stopAnimating()

Important Notification

IGStoryButton is initialized by code or interface builder, but the size of width and height is required to be equal. If the size of width is different from one of width, fatalError("The size of width and height are required to be equal") is expected to be occurred.

Requirements

Swift 5.3+
iOS 13.0+
Xcode 12.0+

Installation

CocoaPods

Add following to your Podfile and execute pod install

target 'MyApp' do
  pod 'IGStoryButtonKit'
end

Carthage

Add following to your Cartfile and execute carthage bootstrap --platform iOS --use-xcframeworks, and finally import xcframeworks in your project

github "KaoruMuta/IGStoryButtonKit"

Swift Package Manager

Enter this: https://github.com/KaoruMuta/IGStoryButtonKit as Swift Package

Contribution

If you find any issue, please let me know on Issues. Also, If you propose and implement new features, please open Pull Requests following templates.

Let's discuss together to improve that this OSS becomes more convenient for developers! p.s. I'm really happy and improve a motivation to give me star :)

Future Work

  • Introduce loading animation with dash line to make current animation richer (High Priority, but it seems difficult)
  • Styling design something else (ex. border's width)
  • Code refactor

License

Under MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].