From 1d082b4f63eac0b4d6215e87375d50e2f6476cf4 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Wed, 2 Oct 2013 12:33:58 +0200 Subject: [PATCH] Migrate from deprecated UITextAlign* to NSTextAlign* --- Classes/LinphoneUI/UIChatRoomCell.m | 2 +- Classes/Utils/GrowingTextView/HPGrowingTextView.h | 4 ++-- Classes/Utils/GrowingTextView/HPGrowingTextView.m | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Classes/LinphoneUI/UIChatRoomCell.m b/Classes/LinphoneUI/UIChatRoomCell.m index 25d5e2115..484120e04 100644 --- a/Classes/LinphoneUI/UIChatRoomCell.m +++ b/Classes/LinphoneUI/UIChatRoomCell.m @@ -204,7 +204,7 @@ static UIFont *CELL_FONT = nil; } messageSize = [[chat message] sizeWithFont: CELL_FONT constrainedToSize: CGSizeMake(width - CELL_MESSAGE_X_MARGIN, 10000.0f) - lineBreakMode: UILineBreakModeTailTruncation]; + lineBreakMode: NSLineBreakByTruncatingTail]; } else { messageSize = CGSizeMake(CELL_IMAGE_WIDTH, CELL_IMAGE_HEIGHT); } diff --git a/Classes/Utils/GrowingTextView/HPGrowingTextView.h b/Classes/Utils/GrowingTextView/HPGrowingTextView.h index 56fc70ca5..f381d1b39 100755 --- a/Classes/Utils/GrowingTextView/HPGrowingTextView.h +++ b/Classes/Utils/GrowingTextView/HPGrowingTextView.h @@ -63,7 +63,7 @@ //uitextview properties NSObject *__unsafe_unretained delegate; - UITextAlignment textAlignment; + NSTextAlignment textAlignment; NSRange selectedRange; BOOL editable; UIDataDetectorTypes dataDetectorTypes; @@ -84,7 +84,7 @@ @property(nonatomic,strong) NSString *text; @property(nonatomic,strong) UIFont *font; @property(nonatomic,strong) UIColor *textColor; -@property(nonatomic) UITextAlignment textAlignment; // default is UITextAlignmentLeft +@property(nonatomic) NSTextAlignment textAlignment; // default is UITextAlignmentLeft @property(nonatomic) NSRange selectedRange; // only ranges of length 0 are supported @property(nonatomic,getter=isEditable) BOOL editable; @property(nonatomic) UIDataDetectorTypes dataDetectorTypes __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_3_0); diff --git a/Classes/Utils/GrowingTextView/HPGrowingTextView.m b/Classes/Utils/GrowingTextView/HPGrowingTextView.m index 625a17f62..a594818b7 100755 --- a/Classes/Utils/GrowingTextView/HPGrowingTextView.m +++ b/Classes/Utils/GrowingTextView/HPGrowingTextView.m @@ -377,12 +377,12 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// --(void)setTextAlignment:(UITextAlignment)aligment +-(void)setTextAlignment:(NSTextAlignment)aligment { internalTextView.textAlignment = aligment; } --(UITextAlignment)textAlignment +-(NSTextAlignment)textAlignment { return internalTextView.textAlignment; }