Praveen S
Praveen S

Reputation: 10393

View elements resize problem

I have a UiView which contains a UiWebview, UIButton and a UITextView as its elements. I add this UiView to a UIScrollView and resize the frame so that the text view is not visible. When i click the button i resize the view to display the entire UIView including the UItextview.

The problem is , the text view appears below the view when i resize the frame. When i click expand it covers the text view too.

When view is first added i want the view to display just the webview and the button and when button is pressed it should display the text view.

When view is added with resized frame When button is clicked i resize the frame to show text view too

How do i achieve it? Has it got to do with view hierachy?

Upvotes: 0

Views: 137

Answers (1)

thomas
thomas

Reputation: 5649

you should enable clipping on the UIView .

edit: I wouldn't resize the view. Instead I would just change the hidden-property on the textview. If you want to add some animations later then you can modify the alpha-property as well.

Upvotes: 1

Related Questions