jylee
jylee

Reputation: 843

Webview and another View within UIView

So I have a UIViewController, and within that I have two views, a WebView and another view that I made (taken from this tutorial: http://www.raywenderlich.com/1768/how-to-make-a-custom-uiview-a-5-star-rating-view).

In the nib file, I have the rate view on the bottom; but when I run the simulator and go to that view, I don't want the rate view to be on the bottom ALL the time; only when I am at the bottom of the WebView.

(Sorry for not being more clear, basically the Rate View would be like a part of the WebView on the bottom, and the user would see it if they scroll to the bottom of WebView).

Upvotes: 0

Views: 190

Answers (1)

ax123man
ax123man

Reputation: 578

probably not an answer, but the easiest thing would be to incorporate that second view into the content of the web view page. If that's not possible, you could try putting the 5 star view and web view inside of a UIScrollView, but it may cause problems with event handling. Another possibility would be to try to detect when the web view scrolling reaches the bottom and then pop up the 5 star view from the bottom (from off-screen). I think that can be done since UIWebView conforms to UIScrollViewDelegate.

Upvotes: 1

Related Questions