Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions RTLabel.podspec
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions RTLabelProject/Classes/RTLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down