Created
June 6, 2013 13:54
-
-
Save tikidunpon/5721675 to your computer and use it in GitHub Desktop.
SECoreTextで「改行付近の文字が描画されない事がある」問題の再現サンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
/** | |
* 以下のいずれのケースでも末尾の数文字が描画されない | |
* 改行後数文字は描画されず、文字を増やすと描画される事がある。 | |
*/ | |
SETextView *textView = [[SETextView alloc] initWithFrame:CGRectMake(10, 5, 294, 130)]; | |
//SETextView *textView = [[SETextView alloc] initWithFrame:CGRectMake(0, 0, 294, 130)]; | |
//SETextView *textView = [[SETextView alloc] initWithFrame:CGRectMake(0, 0, 320, 130)]; | |
textView.backgroundColor = [UIColor orangeColor]; | |
textView.lineSpacing = 7.5f; | |
textView.font = [UIFont systemFontOfSize:14.0f]; | |
textView.delegate = self; | |
[textView setSelectable: NO]; | |
textView.textAlignment = NSTextAlignmentLeft; | |
textView.text = @"あいうえおかきくけこさしすせそたちつてとなにぬねのあいうえおかきくけこさしすせそたちつてとなにぬねのあいうえおかきくけこさしすせそたちつてと"; | |
[textView sizeToFit]; | |
[self.view addSubview:textView]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lineSpaceingに小数値が入ると発生していたとの事、
最新Verでは少数値を丸める事で対応されています。