GradientView:在iOS和tvOS的UIKit中轻松使用渐变

渐变视图在UIKit中轻松使用渐变。Gradient View是围绕CGGradient的简单UIView包装器。
用法:
// Initialize a gradient view
let gradientView = GradientView(frame: CGRect(x: 20, y: 20, width: 280, height: 280))
// Set the gradient colors
gradientView.colors = [.green, .yellow]
// Optionally set some locations
gradientView.locations = [0.8, 1.0]
// Optionally change the direction. The default is vertical.
gradientView.direction = .horizontal
// Add some borders too if you want
gradientView.topBorderColor = .red
zip
GradientView-master.zip 预估大小:22个文件
folder
GradientView-master 文件夹
file
.gitignore 64B
folder
Sources 文件夹
folder
GradientView 文件夹
file
GradientView.swift 6KB
folder
Example 文件夹
folder
Screenshots 文件夹
file
Screenshot2@2x.png 124KB
file
Screenshot1@2x.png 139KB
file
ViewController.swift 1KB
file
Info.plist 1KB
folder
Images.xcassets 文件夹
folder
AppIcon.appiconset 文件夹
file
Contents.json 2KB
folder
Base.lproj 文件夹
file
LaunchScreen.xib 1KB
file
AppDelegate.swift 606B
file
Readme.markdown 2KB
file
LICENSE 1KB
file
GradientView.podspec 678B
folder
Support 文件夹
file
Info.plist 823B
file
GradientView.h 231B
file
Package.swift 254B
folder
Gradient View.xcodeproj 文件夹
folder
xcshareddata 文件夹
folder
xcschemes 文件夹
file
Example-tvOS.xcscheme 3KB
file
GradientView-iOS.xcscheme 3KB
file
GradientView-tvOS.xcscheme 3KB
file
Example-iOS.xcscheme 3KB
folder
project.xcworkspace 文件夹
folder
xcshareddata 文件夹
file
IDEWorkspaceChecks.plist 238B
file
contents.xcworkspacedata 135B
file
project.pbxproj 30KB
zip 文件大小:246.53KB