Skip to content

Commit f33e1b1

Browse files
committed
version 0.9.0
1 parent c7a2e08 commit f33e1b1

File tree

465 files changed

+32004
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

465 files changed

+32004
-1
lines changed

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: objective-c
2+
osx_image: xcode7
3+
xcode_project: Framework/YYText.xcodeproj
4+
xcode_scheme: YYText
5+
6+
script:
7+
- xctool -project Framework/YYText.xcodeproj -scheme YYText build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
869 KB
Binary file not shown.
24.7 KB
23.7 KB
24.4 KB
186 KB
23.1 KB
27.7 KB
31.2 KB
20.6 KB
18.8 KB
25.4 KB
19.3 KB
30.8 KB
37.9 KB
23.1 KB
22.7 KB
4.29 MB
658 KB
16.4 KB
31.5 KB
502 KB
52.9 KB

Attributes/architecture.png

145 KB

Demo/DemoSnapshot/text_markdown.gif

886 KB

Demo/DemoSnapshot/text_paste.gif

4.48 MB

Demo/DemoSnapshot/text_path.gif

4.15 MB

Demo/DemoSnapshot/text_vertical.gif

1.59 MB

Demo/YYTextDemo.xcodeproj/project.pbxproj

+741
Large diffs are not rendered by default.

Demo/YYTextDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/YYTextDemo/AppDelegate.h

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// AppDelegate.h
3+
// YYTextDemo
4+
//
5+
// Created by ibireme on 15/10/17.
6+
// Copyright © 2015年 ibireme. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
12+
13+
@property (strong, nonatomic) UIWindow *window;
14+
15+
16+
@end
17+

Demo/YYTextDemo/AppDelegate.m

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//
2+
// AppDelegate.m
3+
// YYTextDemo
4+
//
5+
// Created by ibireme on 15/10/17.
6+
// Copyright © 2015年 ibireme. All rights reserved.
7+
//
8+
9+
#import "AppDelegate.h"
10+
11+
@interface AppDelegate ()
12+
13+
@end
14+
15+
@implementation AppDelegate
16+
17+
18+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19+
// Override point for customization after application launch.
20+
return YES;
21+
}
22+
23+
- (void)applicationWillResignActive:(UIApplication *)application {
24+
// 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.
25+
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26+
}
27+
28+
- (void)applicationDidEnterBackground:(UIApplication *)application {
29+
// 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.
30+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31+
}
32+
33+
- (void)applicationWillEnterForeground:(UIApplication *)application {
34+
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35+
}
36+
37+
- (void)applicationDidBecomeActive:(UIApplication *)application {
38+
// 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.
39+
}
40+
41+
- (void)applicationWillTerminate:(UIApplication *)application {
42+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43+
}
44+
45+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "29x29",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "29x29",
11+
"scale" : "3x"
12+
},
13+
{
14+
"idiom" : "iphone",
15+
"size" : "40x40",
16+
"scale" : "2x"
17+
},
18+
{
19+
"idiom" : "iphone",
20+
"size" : "40x40",
21+
"scale" : "3x"
22+
},
23+
{
24+
"idiom" : "iphone",
25+
"size" : "60x60",
26+
"scale" : "2x"
27+
},
28+
{
29+
"idiom" : "iphone",
30+
"size" : "60x60",
31+
"scale" : "3x"
32+
}
33+
],
34+
"info" : {
35+
"version" : 1,
36+
"author" : "xcode"
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
5+
</dependencies>
6+
<scenes>
7+
<!--View Controller-->
8+
<scene sceneID="EHf-IW-A2E">
9+
<objects>
10+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
13+
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
14+
</layoutGuides>
15+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
16+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
17+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18+
<animations/>
19+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
20+
</view>
21+
</viewController>
22+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
23+
</objects>
24+
<point key="canvasLocation" x="53" y="375"/>
25+
</scene>
26+
</scenes>
27+
</document>
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
3+
<dependencies>
4+
<deployment identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
6+
</dependencies>
7+
<scenes>
8+
<!--View Controller-->
9+
<scene sceneID="tne-QT-ifu">
10+
<objects>
11+
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
12+
<layoutGuides>
13+
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
14+
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
15+
</layoutGuides>
16+
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
17+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
18+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19+
<animations/>
20+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
21+
</view>
22+
</viewController>
23+
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
24+
</objects>
25+
</scene>
26+
</scenes>
27+
</document>

Demo/YYTextDemo/CALayer+YYAdd.h

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
//
2+
// CALayer+YYAdd.h
3+
// YYKit <https://github.com/ibireme/YYKit>
4+
//
5+
// Created by ibireme on 14/5/10.
6+
// Copyright (c) 2015 ibireme.
7+
//
8+
// This source code is licensed under the MIT-style license found in the
9+
// LICENSE file in the root directory of this source tree.
10+
//
11+
12+
#import <UIKit/UIKit.h>
13+
#import <QuartzCore/QuartzCore.h>
14+
15+
/**
16+
Provides extensions for `CALayer`.
17+
*/
18+
@interface CALayer (YYAdd)
19+
20+
/**
21+
Take snapshot without transform, image's size equals to bounds.
22+
*/
23+
- (UIImage *)snapshotImage;
24+
25+
/**
26+
Take snapshot without transform, PDF's page size equals to bounds.
27+
*/
28+
- (NSData *)snapshotPDF;
29+
30+
/**
31+
Shortcut to set the layer's shadow
32+
33+
@param color Shadow Color
34+
@param offset Shadow offset
35+
@param radius Shadow radius
36+
*/
37+
- (void)setLayerShadow:(UIColor*)color offset:(CGSize)offset radius:(CGFloat)radius;
38+
39+
/**
40+
Remove all sublayers.
41+
*/
42+
- (void)removeAllSublayers;
43+
44+
@property (nonatomic) CGFloat left; ///< Shortcut for frame.origin.x.
45+
@property (nonatomic) CGFloat top; ///< Shortcut for frame.origin.y
46+
@property (nonatomic) CGFloat right; ///< Shortcut for frame.origin.x + frame.size.width
47+
@property (nonatomic) CGFloat bottom; ///< Shortcut for frame.origin.y + frame.size.height
48+
@property (nonatomic) CGFloat width; ///< Shortcut for frame.size.width.
49+
@property (nonatomic) CGFloat height; ///< Shortcut for frame.size.height.
50+
@property (nonatomic) CGPoint center; ///< Shortcut for center.
51+
@property (nonatomic) CGFloat centerX; ///< Shortcut for center.x
52+
@property (nonatomic) CGFloat centerY; ///< Shortcut for center.y
53+
@property (nonatomic) CGPoint origin; ///< Shortcut for frame.origin.
54+
@property (nonatomic, getter=frameSize, setter=setFrameSize:) CGSize size; ///< Shortcut for frame.size.
55+
56+
57+
@property (nonatomic) CGFloat transformRotation; ///< key path "tranform.rotation"
58+
@property (nonatomic) CGFloat transformRotationX; ///< key path "tranform.rotation.x"
59+
@property (nonatomic) CGFloat transformRotationY; ///< key path "tranform.rotation.y"
60+
@property (nonatomic) CGFloat transformRotationZ; ///< key path "tranform.rotation.z"
61+
@property (nonatomic) CGFloat transformScale; ///< key path "tranform.scale"
62+
@property (nonatomic) CGFloat transformScaleX; ///< key path "tranform.scale.x"
63+
@property (nonatomic) CGFloat transformScaleY; ///< key path "tranform.scale.y"
64+
@property (nonatomic) CGFloat transformScaleZ; ///< key path "tranform.scale.z"
65+
@property (nonatomic) CGFloat transformTranslationX; ///< key path "tranform.translation.x"
66+
@property (nonatomic) CGFloat transformTranslationY; ///< key path "tranform.translation.y"
67+
@property (nonatomic) CGFloat transformTranslationZ; ///< key path "tranform.translation.z"
68+
69+
/**
70+
Shortcut for transform.m34, -1/1000 is a good value.
71+
It should be set before other transform shortcut.
72+
*/
73+
@property (nonatomic, assign) CGFloat transformDepth;
74+
75+
/**
76+
Add a fade animation to layer's contents when the contents is changed.
77+
78+
@param duration Animation duration
79+
@param curve Animation curve.
80+
*/
81+
- (void)addFadeAnimationWithDuration:(NSTimeInterval)duration curve:(UIViewAnimationCurve)curve;
82+
83+
/**
84+
Cancel fade animation which is added with "-addFadeAnimationWithDuration:curve:".
85+
*/
86+
- (void)removePreviousFadeAnimation;
87+
88+
@end

0 commit comments

Comments
 (0)