Further ASTextKitComponents API improvements.

This commit is contained in:
Nadine Salter
2015-01-25 16:26:07 -08:00
parent e0f926c861
commit 241fe8ebb5
2 changed files with 12 additions and 3 deletions

View File

@@ -31,9 +31,9 @@
*/
- (CGSize)sizeForConstrainedWidth:(CGFloat)constrainedWidth;
@property (nonatomic, strong) NSTextStorage *textStorage;
@property (nonatomic, strong) NSTextContainer *textContainer;
@property (nonatomic, strong) NSLayoutManager *layoutManager;
@property (nonatomic, strong, readonly) NSTextStorage *textStorage;
@property (nonatomic, strong, readonly) NSTextContainer *textContainer;
@property (nonatomic, strong, readonly) NSLayoutManager *layoutManager;
@property (nonatomic, strong) UITextView *textView;
@end

View File

@@ -8,6 +8,15 @@
#import "ASTextNodeTextKitHelpers.h"
@interface ASTextKitComponents ()
// read-write redeclarations
@property (nonatomic, strong, readwrite) NSTextStorage *textStorage;
@property (nonatomic, strong, readwrite) NSTextContainer *textContainer;
@property (nonatomic, strong, readwrite) NSLayoutManager *layoutManager;
@end
@implementation ASTextKitComponents
+ (ASTextKitComponents *)componentsWithAttributedSeedString:(NSAttributedString *)attributedSeedString