Conical (angular) gradient for iOS written in Swift

Overview

Swift 4.2 Platforms iOS CocoaPods Carthage Swift Package Manager License MIT

AEConicalGradient

Conical (angular) gradient in Swift

I hope that somebody will find this useful. And nice.

AEConicalGradient

Usage

AEConicalGradient is a minion which consists of two objects:

  • ConicalGradientLayer
    Subclass of CALayer which performs drawing of conical gradient. You can set colors, locations, start/end angle for the gradient. If no colors are set, default colors will be used. If no locations are set, colors will be equally distributed.

  • ConicalGradientView
    Subclass of UIView which uses ConicalGradientLayer as the view’s Core Animation layer. You can configure conical gradient options with gradient property.

Installation

License

AEConicalGradient is released under the MIT license. See LICENSE for details.

done for fun

You might also like...
Visual designing library for iOS & OSX
Visual designing library for iOS & OSX

ProcessingKit ProcessingKit is a Visual designing library for iOS & OSX. ProcessingKit written in Swift 🐧 and you can write like processing. Demo Dem

GraphLayout - iOS UI controls to visualize graphs. Powered by Graphviz
GraphLayout - iOS UI controls to visualize graphs. Powered by Graphviz

GraphLayout GraphLayout - UI controls for graph visualization. It is powered by Graphviz. Graph visualization is a way of representing structural info

The application is develop in Objective IOS. kids can draw whatever they want and also kids can save the drawing as well as undo erase the drawing.
The application is develop in Objective IOS. kids can draw whatever they want and also kids can save the drawing as well as undo erase the drawing.

IOSObjC_KidsBoard The application is develop in Objective IOS. kids can draw whatever they want and also kids can save the drawing as well as undo era

Create Live Graphics in SwiftUI (iOS, tvOS & macOS)

PixelUI import SwiftUI import PixelUI struct ContentView: View { var body: some View { GeometryReader { geo in

📰 Consistent & accessible visual styling on iOS with support for Dynamic Type.
📰 Consistent & accessible visual styling on iOS with support for Dynamic Type.

TypographyKit makes it easy to define typography styles and colour palettes in your iOS app helping you achieve visual consistency in your design as w

A simple, declarative, functional drawing framework, in Swift!
A simple, declarative, functional drawing framework, in Swift!

DePict - A simple, declarative, functional drawing framework. To produce a drawing, call the Draw function (just type Draw and let autocomplete do the

❄️  SVG in Swift
❄️ SVG in Swift

Snowflake ❤️ Support my apps ❤️ Push Hero - pure Swift native macOS application to test push notifications PastePal - Pasteboard, note and shortcut ma

Powerful and easy-to-use vector graphics Swift library with SVG support
Powerful and easy-to-use vector graphics Swift library with SVG support

Macaw Powerful and easy-to-use vector graphics Swift library with SVG support We are a development agency building phenomenal apps. What is Macaw? Mac

Unique blocky identicons generator for Swift
Unique blocky identicons generator for Swift

⚗️ BlockiesSwift This library is a Swift implementation of the Ethereum fork of Blockies which is intended to be used in iOS, watchOS, tvOS and macOS

Comments
  • Support for offset angle

    Support for offset angle

    Could you add support for setting the starting angle for the GradientLayer?

    I got this to work by adding an offset to the angle property in drawRect before calling colorForAngle

    opened by davidmuzi 7
  • Kellyroach/tapgesture

    Kellyroach/tapgesture

    This pull request

    • Adds a tap gesture recognizer to the demo app so that whenever the user taps the screen, the user is welcomed with a new random conical gradient. This is the same behavior which was and still is available by rotating device twice, e.g. portrait -> landscape -> portrait .
    • Adds an AppIcon and LaunchImage to the demo app.
    • Fixes repo issue startAngle/endAngle Behavior https://github.com/tadija/AEConicalGradient/issues/3
    opened by kellyroach 1
  • startAngle/endAngle Behavior

    startAngle/endAngle Behavior

    I would expect the color at location 0.0 to begin at startAngle and the color at 1.0 to end at endAngle; however, it appears colors are unconditionally distributed from 0 to 2pi and startAngle/endAngle simply clip the drawing. For example,

    gradientView.gradient.colors = [UIColor.red, UIColor.yellow, UIColor.green] gradientView.gradient.startAngle = .pi gradientView.gradient.endAngle = 2 * .pi

    I would expect this to draw red-yellow-green across the top half of the view. However, it draws only yellow-green across the top half.

    opened by chulbert 1
  • Animatable Properties

    Animatable Properties

    The documentation in the code say that both colors and locations are supposed to be animatable, but I can't seem to get them to animate with a UIView animation or a CA Basic key path animator. If the docs are correct, how are you animating color transitions?

    opened by joeblau 3
Owner
Marko Tadić
keep it simple
Marko Tadić
🎞 Powerful gradient animations made simple for iOS.

AnimatedGradientView is a UIView subclass which makes it simple to add animated gradients to your iOS app. It is written purely in Swift. Further docu

Ross Butler 431 Dec 12, 2022
A lightweight XMLParser for assembling and parsing XML values written for iOS 8+ in Swift 2.

Overview Description Requirements Installation Usage Author License Description XMLParser lets you convert a pure Swift dictionary into XML string and

Eugene Mozharovsky 75 Feb 2, 2022
QEMU-Manager is a macOS graphical frontend to QEMU, written in Swift.

QEMU-Manager About QEMU-Manager is a macOS graphical frontend to QEMU, written in Swift. Screenshots General Configuration: Hardware Configuration: Di

Jean-David Gadina 212 Jan 6, 2023
SVG parser and renderer written in SwiftUI

SVGView SVG parser written in SwiftUI We are a development agency building phenomenal apps. Overview The goal of this project is to bring the full pow

Exyte 269 Jan 4, 2023
A super easy way to check if the installed app has an update available. It is built with simplicity and customisability in mind and comes with pre-written tests.

UpdateAvailableKit This is UpdateAvailableKit: a super easy way to check if the installed app has an update available. It is built with simplicity and

Swapnanil Dhol 22 Jan 5, 2023
Drawing and Geometry made easy on iOS - now in Swift 3.0

InkKit Swift Support Swift 4.0 InkKit is Swift 4.0 by default, so to use that just include InkKit in your podfile: pod 'InkKit' Swift 3.2 In order to

Shaps 373 Dec 27, 2022
The code for my CoreGraphics+CoreAnimation talk, held during the 2012 iOS Game Design Seminar at the Technical University Munich.

PKCoreTechniques ======= Core Techniques is the result of a presentation I held at the Technical University of Munich during the 'iOS Game Design Semi

Philip Kluz 143 Sep 21, 2022
iOS utility classes for asynchronous rendering and display.

YYAsyncLayer iOS utility classes for asynchronous rendering and display. (It was used by YYText) Simple Usage @interface YYLabel : UIView @property NS

null 672 Dec 27, 2022
An iOS framework for easily adding drawings and text to images.

jot is an easy way to add touch-controlled drawings and text to images in your iOS app. What's jot for? Annotating Images jot is the easiest way to ad

IFTTT 1.8k Oct 28, 2022
Display and interact with SVG Images on iOS / OS X, using native rendering (CoreAnimation)

SVGKit SVGKit is a Cocoa framework for rendering SVG files natively: it's fast and powerful. Some additional info and links are on the wiki Versions:

null 4.3k Jan 3, 2023