├── CCPTextAnimation
├── Assets.xcassets
│ ├── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController.swift
├── Info.plist
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
└── AppDelegate.swift
├── CCPTextAnimation.xcodeproj
├── xcuserdata
│ └── chuchengpeng.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── project.pbxproj
└── Animations
├── CCPTextAvaiable.swift
└── GradientText.swift
/CCPTextAnimation/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CCPTextAnimation.xcodeproj/xcuserdata/chuchengpeng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/CCPTextAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CCPTextAnimation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CCPTextAnimation.xcodeproj/xcuserdata/chuchengpeng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CCPTextAnimation.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/CCPTextAnimation/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // CCPTextAnimation
4 | //
5 | // Created by 储诚鹏 on 2019/1/30.
6 | // Copyright © 2019 储诚鹏. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | GradientText.animation(in: self.view, origin: CGPoint(x: 10, y: 100), text: "这是一个测试字符串")
16 | GradientText.animation(in: self.view, origin: CGPoint(x: 10, y: 180), text: Date())
17 | let data = "我是一个转化成data的字符串".data(using: .utf8)
18 | GradientText.animation(in: self.view, origin: CGPoint(x: 10, y: 260), text: data ?? "data为空")
19 | GradientText.animation(in: self.view, origin: CGPoint(x: 10, y: 320), texts: ["第一行", "第二行", "第三行"])
20 |
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/CCPTextAnimation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/CCPTextAnimation/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CCPTextAnimation/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/CCPTextAnimation/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/CCPTextAnimation/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // CCPTextAnimation
4 | //
5 | // Created by 储诚鹏 on 2019/1/30.
6 | // Copyright © 2019 储诚鹏. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Animations/CCPTextAvaiable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TextPathAnimation.swift
3 | // CCPTextAnimation
4 | //
5 | // Created by 储诚鹏 on 2019/1/30.
6 | // Copyright © 2019 储诚鹏. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | extension String: CCPTextAvaiable {
12 | public var text: String { return self }
13 | }
14 |
15 | extension Date: CCPTextAvaiable {
16 | public var text: String {
17 | let format = DateFormatter()
18 | format.dateFormat = "yyyy-MM-dd HH:mm:ss"
19 | return "时间是: " + format.string(from: self)
20 | }
21 | }
22 |
23 | extension Data: CCPTextAvaiable {
24 | public var text: String {
25 | return String.init(data: self, encoding: .utf8) ?? "不能把当前data转换成字符串"
26 | }
27 | }
28 |
29 | public protocol CCPTextAvaiable {
30 | var text: String { get }
31 | func bezierPath() -> UIBezierPath
32 | }
33 |
34 | extension CCPTextAvaiable {
35 |
36 | public func bezierPath() -> UIBezierPath {
37 | return self.bezierPath(from: self.text)
38 | }
39 |
40 | private func bezierPath(from str: String) -> UIBezierPath {
41 | let fontName = __CFStringMakeConstantString("PingFangSC-Regular")!
42 | let cFont = CTFontCreateWithName(fontName, 25, nil)
43 | let attributeStr = NSAttributedString(string: str, attributes: [.font : cFont])
44 | let line = CTLineCreateWithAttributedString(attributeStr as CFAttributedString)
45 | let bPath = UIBezierPath()
46 | bPath.move(to: .zero)
47 | bPath.append(UIBezierPath(cgPath: paths(CTLineGetGlyphRuns(line), fontName)))
48 | return bPath
49 | }
50 |
51 | private func path(_ ctRun: CTRun, _ ctRunFont: CTFont, _ mPath: CGMutablePath) {
52 |
53 | for ctIdx in 0 ..< CTRunGetGlyphCount(ctRun) {
54 | let range = CFRange(location: ctIdx, length: 1)
55 | let glyph = UnsafeMutablePointer.allocate(capacity: 1)
56 | glyph.initialize(to: 0)
57 | let pos = UnsafeMutablePointer.allocate(capacity: 1)
58 | pos.initialize(to: .zero)
59 | CTRunGetGlyphs(ctRun, range, glyph)
60 | CTRunGetPositions(ctRun, range, pos)
61 | let posX = pos.pointee.x
62 | let rate = Int(posX / UIScreen.main.bounds.width)
63 | guard let path = CTFontCreatePathForGlyph(ctRunFont, glyph.pointee, nil) else { continue }
64 | let x = rate > 0 ? 0 : posX
65 | let y = pos.pointee.y - CGFloat(rate) * 88
66 | mPath.addPath(path, transform: CGAffineTransform(translationX: x, y: y))
67 | glyph.deallocate()
68 | pos.deallocate()
69 | }
70 | }
71 |
72 | private func paths(_ runs: CFArray, _ fontName: CFString) -> CGPath {
73 | let mPath = CGMutablePath()
74 | let ctFontName = unsafeBitCast(__CFStringMakeConstantString("NSFont"), to: UnsafeRawPointer.self)
75 | for idx in 0 ..< CFArrayGetCount(runs) {
76 | let ctRun = unsafeBitCast(CFArrayGetValueAtIndex(runs, idx), to: CTRun.self)
77 | let runFont = CFDictionaryGetValue(CTRunGetAttributes(ctRun), ctFontName)
78 | let ctRunFont = unsafeBitCast(runFont, to: CTFont.self)
79 | path(ctRun, ctRunFont, mPath)
80 | }
81 | return mPath
82 | }
83 | }
84 |
85 |
86 |
--------------------------------------------------------------------------------
/Animations/GradientText.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GradientText.swift
3 | // CCPTextAnimation
4 | //
5 | // Created by 储诚鹏 on 2019/1/31.
6 | // Copyright © 2019 储诚鹏. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | private let textAnimationDuration: TimeInterval = 5
12 |
13 | class GradientText: UIView {
14 | private let gradientLayer = CAGradientLayer()
15 | private let gradientAnimationDuration: TimeInterval = 0.5
16 | private let textLayer = CAShapeLayer()
17 | private let text: String
18 |
19 | public static func animation(in view: UIView, origin: CGPoint, text: CCPTextAvaiable) {
20 | let textSize = text.bezierPath().cgPath.boundingBox.size
21 | let gt = GradientText(frame: CGRect(origin: origin, size: textSize), text: text.text)
22 | view.addSubview(gt)
23 | }
24 |
25 | public static func animation(in view: UIView, origin: CGPoint, texts: [CCPTextAvaiable]) {
26 | var offsetOrigin = origin
27 | var after: TimeInterval = 0
28 | for text in texts {
29 | DispatchQueue.main.asyncAfter(deadline: .now() + after) {
30 | let textSize = text.bezierPath().cgPath.boundingBox.size
31 | let gt = GradientText(frame: CGRect(origin: offsetOrigin, size: textSize), text: text.text)
32 | offsetOrigin.y += textSize.height + 20
33 | view.addSubview(gt)
34 | }
35 | after += textAnimationDuration
36 |
37 | }
38 |
39 | }
40 |
41 | init(frame: CGRect, text: CCPTextAvaiable) {
42 | self.text = text.text
43 | super.init(frame: frame)
44 | setup()
45 | }
46 |
47 | required init?(coder aDecoder: NSCoder) {
48 | fatalError("init(coder:) has not been implemented")
49 | }
50 |
51 | private func setup() {
52 | addGradient()
53 | addTextLayer()
54 | gradientLayer.mask = textLayer
55 | }
56 |
57 | private func addGradient() {
58 | let topColor = UIColor(red: 91 / 255, green: 255 / 255, blue: 91 / 255, alpha: 1.0).cgColor
59 | let bottomColor = UIColor(red: 255 / 255, green: 24 / 255, blue: 24 / 255, alpha: 1.0).cgColor
60 | gradientLayer.startPoint = CGPoint(x: 0, y: 0.5)
61 | gradientLayer.endPoint = CGPoint(x: 1, y: 0.5)
62 | gradientLayer.colors = [topColor, bottomColor]
63 | gradientLayer.frame = self.bounds
64 | gradientLayer.type = .axial
65 | self.layer.addSublayer(gradientLayer)
66 | gradientAnimation()
67 | }
68 |
69 | private func stringSize() -> CGSize {
70 | return textLayer.bounds.size
71 | }
72 |
73 | private func addTextLayer() {
74 | let textPath = text.bezierPath()
75 | textLayer.bounds = textPath.cgPath.boundingBox
76 | textLayer.position = gradientLayer.position
77 | textLayer.path = textPath.cgPath
78 | //是否垂直翻转
79 | textLayer.isGeometryFlipped = true
80 | textLayer.fillColor = nil
81 | textLayer.lineWidth = 1
82 | textLayer.strokeColor = UIColor.black.cgColor
83 | textAnimation()
84 | }
85 |
86 | private func textAnimation() {
87 | let animation = CABasicAnimation(keyPath: "strokeEnd")
88 | animation.duration = textAnimationDuration
89 | animation.fromValue = 0
90 | animation.toValue = 1
91 | textLayer.add(animation, forKey: "textAnimation")
92 | }
93 |
94 | private func gradientAnimation() {
95 | let animation = CABasicAnimation(keyPath: "colors")
96 | animation.duration = gradientAnimationDuration
97 | animation.repeatCount = Float.infinity
98 | animation.autoreverses = true
99 | animation.toValue = colors()
100 | gradientLayer.add(animation, forKey: "gradientAnimation")
101 | }
102 |
103 | private func colors() -> [CGColor] {
104 | var colors = [CGColor]()
105 | for _ in 0 ... 9 {
106 | let color = UIColor(red: randomColorValue(), green: randomColorValue(), blue: randomColorValue(), alpha: 1.0)
107 | colors.append(color.cgColor)
108 | }
109 | return colors
110 | }
111 |
112 | private func randomColorValue() -> CGFloat {
113 | return CGFloat(arc4random_uniform(255) / 255)
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/CCPTextAnimation.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0076BEE22201989C00F314C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0076BEE12201989C00F314C2 /* AppDelegate.swift */; };
11 | 0076BEE42201989C00F314C2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0076BEE32201989C00F314C2 /* ViewController.swift */; };
12 | 0076BEE72201989C00F314C2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0076BEE52201989C00F314C2 /* Main.storyboard */; };
13 | 0076BEE92201989D00F314C2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0076BEE82201989D00F314C2 /* Assets.xcassets */; };
14 | 0076BEEC2201989D00F314C2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0076BEEA2201989D00F314C2 /* LaunchScreen.storyboard */; };
15 | 00C748512202874700060290 /* GradientText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00C748502202874700060290 /* GradientText.swift */; };
16 | 00C748532202909900060290 /* CCPTextAvaiable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00C748522202909900060290 /* CCPTextAvaiable.swift */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXFileReference section */
20 | 0076BEDE2201989C00F314C2 /* CCPTextAnimation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CCPTextAnimation.app; sourceTree = BUILT_PRODUCTS_DIR; };
21 | 0076BEE12201989C00F314C2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
22 | 0076BEE32201989C00F314C2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
23 | 0076BEE62201989C00F314C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
24 | 0076BEE82201989D00F314C2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
25 | 0076BEEB2201989D00F314C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
26 | 0076BEED2201989D00F314C2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
27 | 00C748502202874700060290 /* GradientText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientText.swift; sourceTree = ""; };
28 | 00C748522202909900060290 /* CCPTextAvaiable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCPTextAvaiable.swift; sourceTree = ""; };
29 | /* End PBXFileReference section */
30 |
31 | /* Begin PBXFrameworksBuildPhase section */
32 | 0076BEDB2201989C00F314C2 /* Frameworks */ = {
33 | isa = PBXFrameworksBuildPhase;
34 | buildActionMask = 2147483647;
35 | files = (
36 | );
37 | runOnlyForDeploymentPostprocessing = 0;
38 | };
39 | /* End PBXFrameworksBuildPhase section */
40 |
41 | /* Begin PBXGroup section */
42 | 0076BED52201989C00F314C2 = {
43 | isa = PBXGroup;
44 | children = (
45 | 0076BEF3220198AE00F314C2 /* Animations */,
46 | 0076BEE02201989C00F314C2 /* CCPTextAnimation */,
47 | 0076BEDF2201989C00F314C2 /* Products */,
48 | );
49 | sourceTree = "";
50 | };
51 | 0076BEDF2201989C00F314C2 /* Products */ = {
52 | isa = PBXGroup;
53 | children = (
54 | 0076BEDE2201989C00F314C2 /* CCPTextAnimation.app */,
55 | );
56 | name = Products;
57 | sourceTree = "";
58 | };
59 | 0076BEE02201989C00F314C2 /* CCPTextAnimation */ = {
60 | isa = PBXGroup;
61 | children = (
62 | 0076BEE12201989C00F314C2 /* AppDelegate.swift */,
63 | 0076BEE32201989C00F314C2 /* ViewController.swift */,
64 | 0076BEE52201989C00F314C2 /* Main.storyboard */,
65 | 0076BEE82201989D00F314C2 /* Assets.xcassets */,
66 | 0076BEEA2201989D00F314C2 /* LaunchScreen.storyboard */,
67 | 0076BEED2201989D00F314C2 /* Info.plist */,
68 | );
69 | path = CCPTextAnimation;
70 | sourceTree = "";
71 | };
72 | 0076BEF3220198AE00F314C2 /* Animations */ = {
73 | isa = PBXGroup;
74 | children = (
75 | 00C748522202909900060290 /* CCPTextAvaiable.swift */,
76 | 00C748502202874700060290 /* GradientText.swift */,
77 | );
78 | path = Animations;
79 | sourceTree = "";
80 | };
81 | /* End PBXGroup section */
82 |
83 | /* Begin PBXNativeTarget section */
84 | 0076BEDD2201989C00F314C2 /* CCPTextAnimation */ = {
85 | isa = PBXNativeTarget;
86 | buildConfigurationList = 0076BEF02201989D00F314C2 /* Build configuration list for PBXNativeTarget "CCPTextAnimation" */;
87 | buildPhases = (
88 | 0076BEDA2201989C00F314C2 /* Sources */,
89 | 0076BEDB2201989C00F314C2 /* Frameworks */,
90 | 0076BEDC2201989C00F314C2 /* Resources */,
91 | );
92 | buildRules = (
93 | );
94 | dependencies = (
95 | );
96 | name = CCPTextAnimation;
97 | productName = CCPTextAnimation;
98 | productReference = 0076BEDE2201989C00F314C2 /* CCPTextAnimation.app */;
99 | productType = "com.apple.product-type.application";
100 | };
101 | /* End PBXNativeTarget section */
102 |
103 | /* Begin PBXProject section */
104 | 0076BED62201989C00F314C2 /* Project object */ = {
105 | isa = PBXProject;
106 | attributes = {
107 | LastSwiftUpdateCheck = 1010;
108 | LastUpgradeCheck = 1010;
109 | ORGANIZATIONNAME = "储诚鹏";
110 | TargetAttributes = {
111 | 0076BEDD2201989C00F314C2 = {
112 | CreatedOnToolsVersion = 10.1;
113 | };
114 | };
115 | };
116 | buildConfigurationList = 0076BED92201989C00F314C2 /* Build configuration list for PBXProject "CCPTextAnimation" */;
117 | compatibilityVersion = "Xcode 9.3";
118 | developmentRegion = en;
119 | hasScannedForEncodings = 0;
120 | knownRegions = (
121 | en,
122 | Base,
123 | );
124 | mainGroup = 0076BED52201989C00F314C2;
125 | productRefGroup = 0076BEDF2201989C00F314C2 /* Products */;
126 | projectDirPath = "";
127 | projectRoot = "";
128 | targets = (
129 | 0076BEDD2201989C00F314C2 /* CCPTextAnimation */,
130 | );
131 | };
132 | /* End PBXProject section */
133 |
134 | /* Begin PBXResourcesBuildPhase section */
135 | 0076BEDC2201989C00F314C2 /* Resources */ = {
136 | isa = PBXResourcesBuildPhase;
137 | buildActionMask = 2147483647;
138 | files = (
139 | 0076BEEC2201989D00F314C2 /* LaunchScreen.storyboard in Resources */,
140 | 0076BEE92201989D00F314C2 /* Assets.xcassets in Resources */,
141 | 0076BEE72201989C00F314C2 /* Main.storyboard in Resources */,
142 | );
143 | runOnlyForDeploymentPostprocessing = 0;
144 | };
145 | /* End PBXResourcesBuildPhase section */
146 |
147 | /* Begin PBXSourcesBuildPhase section */
148 | 0076BEDA2201989C00F314C2 /* Sources */ = {
149 | isa = PBXSourcesBuildPhase;
150 | buildActionMask = 2147483647;
151 | files = (
152 | 00C748512202874700060290 /* GradientText.swift in Sources */,
153 | 0076BEE42201989C00F314C2 /* ViewController.swift in Sources */,
154 | 00C748532202909900060290 /* CCPTextAvaiable.swift in Sources */,
155 | 0076BEE22201989C00F314C2 /* AppDelegate.swift in Sources */,
156 | );
157 | runOnlyForDeploymentPostprocessing = 0;
158 | };
159 | /* End PBXSourcesBuildPhase section */
160 |
161 | /* Begin PBXVariantGroup section */
162 | 0076BEE52201989C00F314C2 /* Main.storyboard */ = {
163 | isa = PBXVariantGroup;
164 | children = (
165 | 0076BEE62201989C00F314C2 /* Base */,
166 | );
167 | name = Main.storyboard;
168 | sourceTree = "";
169 | };
170 | 0076BEEA2201989D00F314C2 /* LaunchScreen.storyboard */ = {
171 | isa = PBXVariantGroup;
172 | children = (
173 | 0076BEEB2201989D00F314C2 /* Base */,
174 | );
175 | name = LaunchScreen.storyboard;
176 | sourceTree = "";
177 | };
178 | /* End PBXVariantGroup section */
179 |
180 | /* Begin XCBuildConfiguration section */
181 | 0076BEEE2201989D00F314C2 /* Debug */ = {
182 | isa = XCBuildConfiguration;
183 | buildSettings = {
184 | ALWAYS_SEARCH_USER_PATHS = NO;
185 | CLANG_ANALYZER_NONNULL = YES;
186 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
187 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
188 | CLANG_CXX_LIBRARY = "libc++";
189 | CLANG_ENABLE_MODULES = YES;
190 | CLANG_ENABLE_OBJC_ARC = YES;
191 | CLANG_ENABLE_OBJC_WEAK = YES;
192 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
193 | CLANG_WARN_BOOL_CONVERSION = YES;
194 | CLANG_WARN_COMMA = YES;
195 | CLANG_WARN_CONSTANT_CONVERSION = YES;
196 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
197 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
198 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
199 | CLANG_WARN_EMPTY_BODY = YES;
200 | CLANG_WARN_ENUM_CONVERSION = YES;
201 | CLANG_WARN_INFINITE_RECURSION = YES;
202 | CLANG_WARN_INT_CONVERSION = YES;
203 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
204 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
205 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
206 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
207 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
208 | CLANG_WARN_STRICT_PROTOTYPES = YES;
209 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
210 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
211 | CLANG_WARN_UNREACHABLE_CODE = YES;
212 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
213 | CODE_SIGN_IDENTITY = "iPhone Developer";
214 | COPY_PHASE_STRIP = NO;
215 | DEBUG_INFORMATION_FORMAT = dwarf;
216 | ENABLE_STRICT_OBJC_MSGSEND = YES;
217 | ENABLE_TESTABILITY = YES;
218 | GCC_C_LANGUAGE_STANDARD = gnu11;
219 | GCC_DYNAMIC_NO_PIC = NO;
220 | GCC_NO_COMMON_BLOCKS = YES;
221 | GCC_OPTIMIZATION_LEVEL = 0;
222 | GCC_PREPROCESSOR_DEFINITIONS = (
223 | "DEBUG=1",
224 | "$(inherited)",
225 | );
226 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
227 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
228 | GCC_WARN_UNDECLARED_SELECTOR = YES;
229 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
230 | GCC_WARN_UNUSED_FUNCTION = YES;
231 | GCC_WARN_UNUSED_VARIABLE = YES;
232 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
233 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
234 | MTL_FAST_MATH = YES;
235 | ONLY_ACTIVE_ARCH = YES;
236 | SDKROOT = iphoneos;
237 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
238 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
239 | };
240 | name = Debug;
241 | };
242 | 0076BEEF2201989D00F314C2 /* Release */ = {
243 | isa = XCBuildConfiguration;
244 | buildSettings = {
245 | ALWAYS_SEARCH_USER_PATHS = NO;
246 | CLANG_ANALYZER_NONNULL = YES;
247 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
249 | CLANG_CXX_LIBRARY = "libc++";
250 | CLANG_ENABLE_MODULES = YES;
251 | CLANG_ENABLE_OBJC_ARC = YES;
252 | CLANG_ENABLE_OBJC_WEAK = YES;
253 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
254 | CLANG_WARN_BOOL_CONVERSION = YES;
255 | CLANG_WARN_COMMA = YES;
256 | CLANG_WARN_CONSTANT_CONVERSION = YES;
257 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
258 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
259 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
260 | CLANG_WARN_EMPTY_BODY = YES;
261 | CLANG_WARN_ENUM_CONVERSION = YES;
262 | CLANG_WARN_INFINITE_RECURSION = YES;
263 | CLANG_WARN_INT_CONVERSION = YES;
264 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
265 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
266 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
267 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
268 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
269 | CLANG_WARN_STRICT_PROTOTYPES = YES;
270 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
271 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
272 | CLANG_WARN_UNREACHABLE_CODE = YES;
273 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
274 | CODE_SIGN_IDENTITY = "iPhone Developer";
275 | COPY_PHASE_STRIP = NO;
276 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
277 | ENABLE_NS_ASSERTIONS = NO;
278 | ENABLE_STRICT_OBJC_MSGSEND = YES;
279 | GCC_C_LANGUAGE_STANDARD = gnu11;
280 | GCC_NO_COMMON_BLOCKS = YES;
281 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
282 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
283 | GCC_WARN_UNDECLARED_SELECTOR = YES;
284 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
285 | GCC_WARN_UNUSED_FUNCTION = YES;
286 | GCC_WARN_UNUSED_VARIABLE = YES;
287 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
288 | MTL_ENABLE_DEBUG_INFO = NO;
289 | MTL_FAST_MATH = YES;
290 | SDKROOT = iphoneos;
291 | SWIFT_COMPILATION_MODE = wholemodule;
292 | SWIFT_OPTIMIZATION_LEVEL = "-O";
293 | VALIDATE_PRODUCT = YES;
294 | };
295 | name = Release;
296 | };
297 | 0076BEF12201989D00F314C2 /* Debug */ = {
298 | isa = XCBuildConfiguration;
299 | buildSettings = {
300 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
301 | CODE_SIGN_STYLE = Automatic;
302 | DEVELOPMENT_TEAM = ND2NE475A9;
303 | INFOPLIST_FILE = CCPTextAnimation/Info.plist;
304 | LD_RUNPATH_SEARCH_PATHS = (
305 | "$(inherited)",
306 | "@executable_path/Frameworks",
307 | );
308 | PRODUCT_BUNDLE_IDENTIFIER = ccp.CCPTextAnimation;
309 | PRODUCT_NAME = "$(TARGET_NAME)";
310 | SWIFT_VERSION = 4.2;
311 | TARGETED_DEVICE_FAMILY = "1,2";
312 | };
313 | name = Debug;
314 | };
315 | 0076BEF22201989D00F314C2 /* Release */ = {
316 | isa = XCBuildConfiguration;
317 | buildSettings = {
318 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
319 | CODE_SIGN_STYLE = Automatic;
320 | DEVELOPMENT_TEAM = ND2NE475A9;
321 | INFOPLIST_FILE = CCPTextAnimation/Info.plist;
322 | LD_RUNPATH_SEARCH_PATHS = (
323 | "$(inherited)",
324 | "@executable_path/Frameworks",
325 | );
326 | PRODUCT_BUNDLE_IDENTIFIER = ccp.CCPTextAnimation;
327 | PRODUCT_NAME = "$(TARGET_NAME)";
328 | SWIFT_VERSION = 4.2;
329 | TARGETED_DEVICE_FAMILY = "1,2";
330 | };
331 | name = Release;
332 | };
333 | /* End XCBuildConfiguration section */
334 |
335 | /* Begin XCConfigurationList section */
336 | 0076BED92201989C00F314C2 /* Build configuration list for PBXProject "CCPTextAnimation" */ = {
337 | isa = XCConfigurationList;
338 | buildConfigurations = (
339 | 0076BEEE2201989D00F314C2 /* Debug */,
340 | 0076BEEF2201989D00F314C2 /* Release */,
341 | );
342 | defaultConfigurationIsVisible = 0;
343 | defaultConfigurationName = Release;
344 | };
345 | 0076BEF02201989D00F314C2 /* Build configuration list for PBXNativeTarget "CCPTextAnimation" */ = {
346 | isa = XCConfigurationList;
347 | buildConfigurations = (
348 | 0076BEF12201989D00F314C2 /* Debug */,
349 | 0076BEF22201989D00F314C2 /* Release */,
350 | );
351 | defaultConfigurationIsVisible = 0;
352 | defaultConfigurationName = Release;
353 | };
354 | /* End XCConfigurationList section */
355 | };
356 | rootObject = 0076BED62201989C00F314C2 /* Project object */;
357 | }
358 |
--------------------------------------------------------------------------------