I am new to Xcode and iPhone SDK. I want to make a paging enabled horizontal scrolling. But I can’t do that, only vertical scrolling.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Set the
contentSizeproperty of yourUIScrollViewproperly (basically the width/height of the content that can be displayed in the scroll view without scrolling), set thepagingEnabledproperty of the scroll view toYES, and then add your view that you want to scroll as a subview of theUIScrollView. As long as the width of the subview is more than the width of thecontentSizeyou specified, it should scroll horizontally.