Hi guys, I have a UIButton in a ScrollView. This button is hided by the NavigationBar, so it is visible only when the user drag down the ScrollView. I want to check the position of the UIButton, and if the y position is <= 41 then i want to display an Alert How can I make this? Thanks!! Bye
A:
The position of the yButton never changes (As in the frame of the yButton is the same in the scroll view). What does change is the contentOffset
property of the UIScrollView
. So you can implement the delegate method – scrollViewDidScroll:
which can implement the logic to determine if the button is in your desired state.
rickharrison
2010-07-11 14:38:33
Thanks a lot!! Solved!! :D
Obliviux
2010-07-11 16:07:12