Reputation: 617
I'm implementing the a viewController
to enter text and images (very similar to Facebook's "Status" entry) and I have most of it complete, however, the last piece isn't working correctly.
The user can select an image and key-in textual data. As more text are added, the images get pushed down. I implemented this by adding UIImageView
as subview of UIView
, then add UIView
as subview of UITextView
. They stack up like this:
When I key-in long enough text that it pushes the images down, the images do not stay visible inside the UITextView
. I can still see the images if I drag the screen-up, but as soon as I let go, the images bounces down and can't be seen. How do I fix this? Thanks.
Upvotes: 0
Views: 208
Reputation: 2185
You do the followings for this.
1- Have a UIimageView and set your image
2- Draw your UITextview on exact location of image. Means (x,y,w,h) equals
3-Set UItextView background color CLEAR.
and CHEERS
Upvotes: 1