Created
April 9, 2012 16:04
-
-
Save michaelvillar/2344449 to your computer and use it in GitHub Desktop.
TUITextView in TUIScrollView
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
scrollView_ = [[TUIScrollView alloc] initWithFrame:scrollViewFrame]; | |
textView_ = [[TUITextView alloc] initWithFrame:scrollView_.bounds]; | |
textView_.autoresizingMask = TUIViewAutoresizingFlexibleWidth; | |
scrollView_.horizontalScrollIndicatorVisibility = TUIScrollViewIndicatorVisibleNever; | |
scrollView_.scrollEnabled = YES; | |
scrollView_.clipsToBounds = YES; | |
[scrollView_ setContentSize:textView_.bounds.size]; | |
[scrollView_ addSubview:textView_]; |
Yes it is. I use the textViewDidChange delegate method to adjust the sizes.
I tried modifying the example app for TUIKit and it's not working for me. I can't get the scrollview to scroll and update regularly. I hate to be a bother but mind commenting on what i am doing wrong or post an example. https://gist.github.com/2352504
Hmm, moving the scrollbar is working but not the gestures, let me see what is up here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Isn't it necessary to synchronize the contentSize of the scrollview and the textview somehow?