-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hsjcom
authored and
hsjcom
committed
Apr 22, 2015
1 parent
f9fac15
commit d6386dc
Showing
5 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
SoldierShimmering.xcodeproj/project.xcworkspace/xcshareddata/SoldierShimmering.xccheckout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDESourceControlProjectFavoriteDictionaryKey</key> | ||
<false/> | ||
<key>IDESourceControlProjectIdentifier</key> | ||
<string>FFD60FBB-7A01-4D98-A0A5-5AB01686617A</string> | ||
<key>IDESourceControlProjectName</key> | ||
<string>SoldierShimmering</string> | ||
<key>IDESourceControlProjectOriginsDictionary</key> | ||
<dict> | ||
<key>704DFF3E648870946D5AD5850B8869B435FF17A9</key> | ||
<string>https://github.com/hsjcom/SoldierShimmering.git</string> | ||
</dict> | ||
<key>IDESourceControlProjectPath</key> | ||
<string>SoldierShimmering.xcodeproj</string> | ||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key> | ||
<dict> | ||
<key>704DFF3E648870946D5AD5850B8869B435FF17A9</key> | ||
<string>../..</string> | ||
</dict> | ||
<key>IDESourceControlProjectURL</key> | ||
<string>https://github.com/hsjcom/SoldierShimmering.git</string> | ||
<key>IDESourceControlProjectVersion</key> | ||
<integer>111</integer> | ||
<key>IDESourceControlProjectWCCIdentifier</key> | ||
<string>704DFF3E648870946D5AD5850B8869B435FF17A9</string> | ||
<key>IDESourceControlProjectWCConfigurations</key> | ||
<array> | ||
<dict> | ||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key> | ||
<string>public.vcs.git</string> | ||
<key>IDESourceControlWCCIdentifierKey</key> | ||
<string>704DFF3E648870946D5AD5850B8869B435FF17A9</string> | ||
<key>IDESourceControlWCCName</key> | ||
<string>SoldierShimmering</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// SJShimmeringText.h | ||
// SoldierShimmering | ||
// | ||
// Created by Soldier on 15/4/22. | ||
// Copyright (c) 2015年 Soldier. All rights reserved. | ||
// | ||
|
||
#import "FBShimmeringView.h" | ||
#import <UIKit/UIKit.h> | ||
|
||
@interface SJShimmeringText : FBShimmeringView | ||
|
||
@property(nonatomic, strong) UILabel *textLabel; | ||
|
||
- (instancetype)initWithFrame:(CGRect)frame | ||
text:(NSString *)text | ||
font:(UIFont *)font | ||
textColor:(UIColor *)textColor | ||
textAlignment:(NSTextAlignment)textAlignment; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// SJShimmeringText.m | ||
// SoldierShimmering | ||
// | ||
// Created by Soldier on 15/4/22. | ||
// Copyright (c) 2015年 Soldier. All rights reserved. | ||
// | ||
|
||
#import "SJShimmeringText.h" | ||
|
||
@implementation SJShimmeringText | ||
|
||
- (instancetype)initWithFrame:(CGRect)frame | ||
text:(NSString *)text | ||
font:(UIFont *)font | ||
textColor:(UIColor *)textColor | ||
textAlignment:(NSTextAlignment)textAlignment { | ||
self = [super initWithFrame:frame]; | ||
if (self) { | ||
self.shimmering = YES; | ||
self.shimmeringBeginFadeDuration = 0.3; | ||
self.shimmeringOpacity = 0.3; | ||
self.shimmeringSpeed = 230; | ||
|
||
_textLabel = [[UILabel alloc] initWithFrame:frame]; | ||
_textLabel.text = text; | ||
_textLabel.font = font; | ||
_textLabel.textColor = textColor; | ||
_textLabel.textAlignment = textAlignment; | ||
[_textLabel sizeToFit]; | ||
_textLabel.frame = CGRectMake(0, 0, _textLabel.frame.size.width, _textLabel.frame.size.height); | ||
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, _textLabel.frame.size.width, _textLabel.frame.size.height); | ||
self.contentView = _textLabel; | ||
} | ||
return self; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters