Skip to content

Commit 2c1a2cf

Browse files
author
MattFoley
committed
Update README.md
instructions for attributedStrings.
1 parent c7c7eb0 commit 2c1a2cf

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ This allows you to pass in an already created label:
5555
displayingAt:(CGPoint)displayPoint
5656
endingAt:(CGPoint)endPoint
5757
inTargetView:(UIView*)view;
58+
5859

5960
Your target view is the view you want your animation to display in.
6061

@@ -66,6 +67,28 @@ Your endpoint is the position your label will animate out to after displaying if
6667

6768
### Notes
6869

70+
#### Attributed Strings
71+
72+
MFLHintLabel now supports NSAttributedString, TTTAttributedLabel and OHAttributedLabel as well as UILabels with their attributedText property set.
73+
74+
Use this call to pass in an attributedString.
75+
76+
- (MFLHintLabel *)createHintAnimationForAttributedText:(NSAttributedString*)text
77+
beginningAt:(CGPoint)startPoint
78+
displayingAt:(CGPoint)displayPoint
79+
endingAt:(CGPoint)endPoint
80+
inTargetView:(UIView*)view
81+
82+
MFLHintLabel creation from a label will prefer loading attributedText over text, if both properties are set. To use an OHAttributedLabel or a TTTAttributedLabel simply cast it as a UILabel, and since all three have an "attributedText" property, it should all work out fine.
83+
84+
- (MFLHintLabel *)createHintAnimationForLabel:(UILabel*)label
85+
beginningAt:(CGPoint)startPoint
86+
displayingAt:(CGPoint)displayPoint
87+
endingAt:(CGPoint)endPoint
88+
inTargetView:(UIView*)view;
89+
90+
91+
6992
##### Displaying without running
7093
Be sure to call prepareToRun after you finish setting up your MFLHintLabel. This will create the structure for your animation, add it to the targetView view hierarchy and ready it to be run. Call this if you want to show your animation at it's startPosition for some time before running the animation.
7194

0 commit comments

Comments
 (0)