Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dhirajjadhao/Newly
Newly is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button. It can be used to notify user about new content availability and can other actions can be triggers using its delegate method.
https://github.com/dhirajjadhao/Newly
Last synced: 3 months ago
JSON representation
Newly is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button. It can be used to notify user about new content availability and can other actions can be triggers using its delegate method.
- Host: GitHub
- URL: https://github.com/dhirajjadhao/Newly
- Owner: dhirajjadhao
- License: mit
- Created: 2016-11-18T07:33:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T04:56:09.000Z (almost 6 years ago)
- Last Synced: 2024-08-04T02:28:52.911Z (3 months ago)
- Language: Objective-C
- Homepage:
- Size: 786 KB
- Stars: 197
- Watchers: 10
- Forks: 23
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios-star - Newly - Newly is a drop in solution to add Twitter/Facebook/Linkedin-style new updates/tweets/posts available button. (UI / Font)
- awesome-ios - Newly - Newly is a drop in solution to add Twitter/Facebook/Linkedin-style new updates/tweets/posts available button. (UI / Font)
README
![newly 2](https://cloud.githubusercontent.com/assets/2684979/20462091/9357647c-af38-11e6-992f-07b9c263bb59.png)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Newly.svg)](https://img.shields.io/cocoapods/v/Newly.svg)
[![Platform](https://img.shields.io/cocoapods/p/Newly.svg?style=flat)](http://cocoadocs.org/docsets/Newly)
`Newly` is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button. It can be used to notify user about new content availability and can other actions can be triggers using its delegate method.![ezgif com-resize](https://cloud.githubusercontent.com/assets/2684979/20461445/a411dee6-af24-11e6-89da-5a67796819d6.gif)
![ezgif com-resize-2](https://cloud.githubusercontent.com/assets/2684979/20624689/567c125a-b334-11e6-99a7-3f851f46d05d.gif)- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)## Android Version of Newly:
- Contributed by [Sourabh Karkal](https://github.com/Auto-Droid)
## Requirements- iOS 9.0+
- Xcode 8.0+
- Swift 3.0+## Installation
### CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
```bash
$ gem install cocoapods
```> CocoaPods 1.1.0+ is required to build Newly.
To integrate Newly into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!target '' do
pod 'Newly'
end
```Then, run the following command:
```bash
$ pod install
```## Usage
### Showing Newly
```swift
import Newlylet newly = Newly()
newly.showUpdate(message: "↑ New Tweets")
```
![ezgif com-resize](https://cloud.githubusercontent.com/assets/2684979/20461445/a411dee6-af24-11e6-89da-5a67796819d6.gif)
![ezgif com-resize-2](https://cloud.githubusercontent.com/assets/2684979/20624689/567c125a-b334-11e6-99a7-3f851f46d05d.gif)### Hiding Newly
Use this if you want to manually hide `Newly`. By default `Newly` will hide on touch.
```swift
newly.hideUpdate()
```
### On Click UpdatesYou can use `Newly` delegate to get its on click update.
You can set delegate in your `ViewDidLoad` method.
```swift
newly.delegate = self
```And then add extension for `NewlyDelegate`
```swift
extension ViewController:NewlyDelegate{
func newlyDidTapped() {
// Your custom code to trigger other actions once Newly is touched.
}
}```
### Appearance Customization
You can customize appearance of `Newly` using following properties.
```swift
newly.backgroundColor = UIColor(colorLiteralRed: 0, green: 153.0/255.0, blue: 229.0/255.0, alpha: 1.0)
```
This will set the background colour for `Newly`.```swift
newly.textColor = UIColor.white
```
This will set the text colour for `Newly`.```swift
newly.heightOffset = 78.0
```
This will set the height from top of the screen at which `Newly` will be displayed.```swift
newly.animationInterval = 1.0
```
This is will the animation time interval to show and hide `Newly`.```swift
newly.hideOnTouch = true
```
Whether `Newly` should auto hide on touch.```swift
newly.isUpdateVisible = false
```
Whether `Newly` is currenly visible.