ios - Fixing a UITextView inside a UIScrollView -


I have a scroll called "scroll 1". Under i scroll 1, I am using UIImage with images wrapped in UTIIL views. Loaded. So my architecture scrolls 1-> subview-> is the imageview. The purpose of my application is that the user scrolls the scroll scroll scroll (scroll 1) and when it scrolls the UI image changes - with UIImageViews, a UITextView appears with text data when the user scrolls the text The value of the change occurs, while the user scrolls.
When the user scrolls, I want to stay at the top of UITextView at the top of UIImageVIE as if the text view is embedded inside the ImageView. Similar to scrolling the pages of a story book, when you scroll the image, the image is fixed until the image disappears. I am using the following code:

  CGSize imageSize; ImageSize.height = 693; ImageSize.width = 512; Self.scroll1.minimumZoomScale = 1.0; Self.scroll1.maximumZoomScale = 1.0; Self.scroll1.frame = CGRectMake (0,0, imageSize.width, imageSize.height); Self.scroll1.scrollEnabled = Yes; Self.scroll1.contentSize = CGSizeMake (imageSize.width * imgs.count, imageSize.height); Self.scroll1.pagingEnabled = Yes; Self.scroll1.delegate = self; For (int i = 0; i  

The above code is used to create small subviews, byte text textview.
As I have shown, I tried various methods to add _lefttext to subStave, because I thought adding it would automatically become a part of it and it would be embedded, but either it Not shown or not working. I also tried the following method:

  - (zero) scrollViewDidScroll: (UIScrollView *) scrollView {[_leftText setContentOffset: self.scroll1.contentOffset Animated: Yes]; }  

But this code textView behaves in a weird way and disappears. I hope there is a way I can accomplish. Many thanks to

Put multiple UTFESTFIELD examples above each subview.

  NSMutableArray * textFields = [NSMutableArray array]; For (int i = 0; i  

So there are many text fields instead of just one, then you have to figure out which text field is currently appearing in scrollViewDidScroll: representative The method is better to use the contentoffset property of scroll 1.

  - (zero) scrollviewdcroll: (UIScrollView *) scrollview {CGRect visibleRect; VisibleRect.origin = scrollView.contentOffset; VisibleRect.size = scrollView.bounds.size; // TextFields again via the array to know which textField is currently visible}  

Good luck.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -