From 659daf972e056abd89edaea620c363c62caa9c1c Mon Sep 17 00:00:00 2001 From: bassrock499 Date: Thu, 7 Mar 2013 11:53:19 -0800 Subject: [PATCH 1/2] Create RTLabel.podspec --- RTLabel.podspec | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 RTLabel.podspec diff --git a/RTLabel.podspec b/RTLabel.podspec new file mode 100644 index 0000000..bef39be --- /dev/null +++ b/RTLabel.podspec @@ -0,0 +1,13 @@ +Pod::Spec.new do |s| + s.name = "RTLabel" + s.version = "1.0" + s.summary = "Rich text formatting based on HTML-like markups for iOS." + s.homepage = "https://github.com/honcheng/RTLabel" + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { "Muh Hon Cheng" => "honcheng@gmail.com" } + s.source = { :git => "https://github.com/honcheng/RTLabel.git", :tag => "1.0" } + s.platform = :ios + s.source_files = 'RTLabelProject/Classes/RTLabel.{h,m}' + s.framework = 'CoreText' + s.requires_arc = true +end From fb79e62df0eb16bc066081cc2f7fe69a33c57370 Mon Sep 17 00:00:00 2001 From: bassrock499 Date: Thu, 7 Mar 2013 11:54:09 -0800 Subject: [PATCH 2/2] Update RTLabel.m Adding awakeFromNib --- RTLabelProject/Classes/RTLabel.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/RTLabelProject/Classes/RTLabel.m b/RTLabelProject/Classes/RTLabel.m index 9f4f078..c5b17ce 100755 --- a/RTLabelProject/Classes/RTLabel.m +++ b/RTLabelProject/Classes/RTLabel.m @@ -147,6 +147,20 @@ - (id)initWithFrame:(CGRect)_frame { return self; } +-(void)awakeFromNib { + [self setBackgroundColor:[UIColor clearColor]]; + _font = [UIFont systemFontOfSize:15]; + _textColor = [UIColor blackColor]; + _text = @""; + _textAlignment = RTTextAlignmentLeft; + _lineBreakMode = RTTextLineBreakModeWordWrapping; + _lineSpacing = 3; + _currentSelectedButtonComponentIndex = -1; + _paragraphReplacement = @"\n"; + + [self setMultipleTouchEnabled:YES]; +} + - (void)setTextAlignment:(RTTextAlignment)textAlignment { _textAlignment = textAlignment;