Migrate from deprecated UITextAlign* to NSTextAlign*

This commit is contained in:
Guillaume BIENKOWSKI 2013-10-02 12:33:58 +02:00
parent 81fe7d6bf9
commit 1d082b4f63
3 changed files with 5 additions and 5 deletions

View file

@ -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);
}

View file

@ -63,7 +63,7 @@
//uitextview properties
NSObject <HPGrowingTextViewDelegate> *__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);

View file

@ -377,12 +377,12 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
-(void)setTextAlignment:(UITextAlignment)aligment
-(void)setTextAlignment:(NSTextAlignment)aligment
{
internalTextView.textAlignment = aligment;
}
-(UITextAlignment)textAlignment
-(NSTextAlignment)textAlignment
{
return internalTextView.textAlignment;
}