Dazzling Nights on iOS.

Related tags

UI NightView
Overview

NightView

Build Status Version License Platform

NightView is an open source library that generates beautiful, random, starry skies on iOS.

Table of Contents

Learn more about the NightView project, licensing, support etc.

Requirements

  • Requires iOS 7 or later. The sample project is optimized for iOS 9.
  • Requires Automatic Reference Counting (ARC).
  • Optimized for ARM64 Architecture.

License

See the License. You are free to make changes and use this in either personal or commercial projects. Attribution is not required, but highly appreciated. A little "Thanks!" (or something to that affect) is always welcome. If you use NightView in your app, please let us know!

Support

https://gitter.im/Boris-Em/NightView

Join us on gitter if you have any question!

Sample App

The iOS Sample App included with this project demonstrates one way to correctly setup and use NightView. It also offers the possibility to customize the view within the app.

Getting Started

It only takes a few simple steps to install and setup NightView to your project.

###Installation The easiest way to install NightView is to use CocoaPods. To do so, simply add the following line to your Podfile:

pod 'NightView'

The other way to install NightView, is to drag and drop the NightView folder into your Xcode project. When you do so, make sure to check the "Copy items into destination group's folder" box.

Setup

NightView is a simple UIView subclass. It can be initialized with Interface Builder, or programatically.

Interface Builder Initialization
1 - Drag a UIView to your UIViewController.
2 - Change the class of the new UIView to NightView.
3 - Select the NightView and open the Attributes Inspector. Most of the customizable properties can easily be set from the Attributes Inspector. The Sample App demonstrates this capability.

Programmatical Initialization
Here is an example illustrating how to initialize a NightView instance programmatically:

let nightView = NightView(frame: CGRectMake(0.0, 0.0, 200.0, 200.0))
view.addSubview(nightView)

Documentation

All of the methods and properties available for NightView are documented below.

numberOfPointsForStar

The number of points for each star. For example, setting this property to 1, means that there will be 1 star for every point in the view. A greater number means less stars within the view. Defaults to 10000.0.

starSize

The size of the stars in points. Note that setting starSizeMinRandomizer and starSizeMaxRandomizer will also influence the size of stars. Defaults to 5.0.

starColor

The color of the stars. Defaults to white.

starSizeMinRandomizer

The size of the stars is randomized within the starSize value. This property sets the minimum percent by which the stars' size could be changed. For example, a value of 50.0 means that the minimum size of a star will be 50% of the starSize property. Defaults to 50.0.

starSizeMaxRandomizer

The size of the stars is randomized within the starSize value. This property sets the maximum percent by which the stars' size could be changed. For example, a value of 150.0 means that the maximum size of a star will be 150% of the starSize property. Defaults to 150.0.

minStarOpacity

The stars are drawn with a smaller opacity at the bottom of the view than at the top. This property sets the minimum opacity for the lower stars. Note that the stars at the top of the view will always have an opacity of 1.0. Defaults to 0.5.

glowingIntensity

The intensity of the glowing of the stars, from 0 to 1. If set to 0, the stars will not glow. Defaults to 0.5.

glowingDuration

The duration in seconds at which the stars glow. Defaults to 2.0.

starType

The type of stars to be drawn. Defaults to .Round.

reload()

Reloads the NightView instance, redrawing all of the stars.

You might also like...
A custom reusable circular / progress slider control for iOS application.
A custom reusable circular / progress slider control for iOS application.

HGCircularSlider Example To run the example project, clone the repo, and run pod install from the Example directory first. You also may like HGPlaceho

A customizable color picker for iOS in Swift
A customizable color picker for iOS in Swift

IGColorPicker is a fantastic color picker 🎨 written in Swift. Table of Contents Documentation Colors Style Other features Installation Example Gettin

⚡️ A library of widgets and helpers to build instant-search applications on iOS.
⚡️ A library of widgets and helpers to build instant-search applications on iOS.

By Algolia. InstantSearch family: InstantSearch iOS | InstantSearch Android | React InstantSearch | InstantSearch.js | Angular InstantSearch | Vue Ins

An iOS picker view to serve all your
An iOS picker view to serve all your "picking" needs

Mandoline The PickerView is a UICollectionView that provides a smooth "picking" interface. In order to get the most out of it, a consuming view contro

A draggable modal for iOS Applications.
A draggable modal for iOS Applications.

Mantle Modal Draggable Modal, PopUp or Menu written in Swift. Description A simple modal resource that uses a UIScrollView to allow the user to close

Material, a UI/UX framework for creating beautiful iOS applications
Material, a UI/UX framework for creating beautiful iOS applications

Material Welcome to Material, a UI/UX framework for creating beautiful applications. Material's animation system has been completely reworked to take

Modular and customizable Material Design UI components for iOS
Modular and customizable Material Design UI components for iOS

Material Components for iOS Material Components for iOS (MDC-iOS) helps developers execute Material Design. Developed by a core team of engineers and

Material design components for iOS written in Swift
Material design components for iOS written in Swift

MaterialKit NOTE: This project is unmaintained. Material design components (inspired by Google Material Design) for iOS written in Swift Please feel f

🏞 A simple iOS photo and video browser with optional grid view, captions and selections written in Swift5.0
🏞 A simple iOS photo and video browser with optional grid view, captions and selections written in Swift5.0

Introduction 🏞 MediaBrowser can display one or more images or videos by providing either UIImage objects, PHAsset objects, or URLs to library assets,

Comments
Releases(1.0.1)
Owner
Boris Emorine
Boris Emorine
Super awesome Swift minion for Core Data (iOS, macOS, tvOS)

⚠️ Since this repository is going to be archived soon, I suggest migrating to NSPersistentContainer instead (available since iOS 10). For other conven

Marko Tadić 306 Sep 23, 2022
A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView and iPhone X safe area support for content reloading. Built for iOS 10 and later.

Arale A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView support for reloading your content. Built f

Putra Z. 43 Feb 4, 2022
BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen

BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well

Alexis (Aubry) Akers 5.3k Jan 2, 2023
💾 A collection of classic-style UI components for iOS

A collection of classic-style UI components for UIKit, influenced by Windows 95 Introduction This is a little exploration into applying '90s-era desig

Blake Tsuzaki 2.2k Dec 22, 2022
A simple, customizable view for efficiently collecting country information in iOS apps.

CountryPickerView CountryPickerView is a simple, customizable view for selecting countries in iOS apps. You can clone/download the repository and run

Kizito Nwose 459 Dec 27, 2022
A library to recreate the iOS Apple Music now playing transition

DeckTransition DeckTransition is an attempt to recreate the card-like transition found in the iOS 10 Apple Music and iMessage apps. Hereʼs a GIF showi

Harshil Shah 2.2k Dec 15, 2022
A message bar for iOS written in Swift.

Dodo, a message bar for iOS / Swift This is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, so

Evgenii Neumerzhitckii 874 Dec 13, 2022
Protocol oriented, type safe, scalable design system foundation swift framework for iOS.

Doric: Design System Foundation Design System foundation written in Swift. Protocol oriented, type safe, scalable framework for iOS. Features Requirem

Jay 93 Dec 6, 2022
A Material Design drop down for iOS

A Material Design drop down for iOS written in Swift. Demo Do pod try DropDown in your console and run the project to try a demo. To install CocoaPods

AssistoLab 2.3k Dec 20, 2022
An easy to use FAQ view for iOS written in Swift

FAQView An easy to use FAQ view for iOS written in Swift. This view is a subclass of UIView. Setup with CocoaPods If you are using CocoaPods add this

Mukesh Thawani 467 Dec 5, 2022