以前問過的問題完全一樣,但我想要某人將答案的代碼轉換爲Swift,因爲它在objective-c中。我也想在故事板上做大部分,可以SO用戶請幫助我嗎? UITextView in UIScrollView with paging not scrollingUITextView分頁不滾動
如果你懶得看的聯繫,就像我們都是:
CGRect labelFrame;
UITextView *textView;
labelFrame.size.width = scrollView.frame.size.width-24;
labelFrame.size.height = scrollView.frame.size.height-48;
labelFrame.origin.x = 10;
labelFrame.origin.y = 40;
textView = [[UITextView alloc] initWithFrame:labelFrame];
textView.textColor = [UIColor blackColor];
textView.backgroundColor = [UIColor redColor];
textView.font = [UIFont systemFontOfSize:13];
textView.text = @"a very long text";
textView.editable = NO;
textView.scrollEnabled = YES;
textView.userInteractionEnabled = YES;
textView.delegate = self;
textView.contentSize = CGSizeMake(1, 1000); //this would make it scroll?
[subview addSubview:textView];
而且,這個問題的答案,我不完全理解他在說什麼。
我說分頁具體而言,不滾動,還是謝謝你! – wogwog 2015-04-05 00:27:44