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 (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T04:56:09.000Z (over 6 years ago)
- Last Synced: 2024-11-10T22:28:38.598Z (3 months ago)
- Language: Objective-C
- Homepage:
- Size: 786 KB
- Stars: 194
- 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

[](https://img.shields.io/cocoapods/v/Newly.svg)
[](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.
- [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")
```

### 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.