Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
UIScrollView won't scroll? (WAX) — Gideros Forum

UIScrollView won't scroll? (WAX)

ljp1203ljp1203 Member
edited January 2013 in General questions
Hi,

I am using HotWax by @bowerandy.

I need some help. When I add a UIScrollView to my app, it won't scroll. It shows up, but it won't scroll when I touch it.

Would anyone know the problem?

Thanks.
-Landon
JLS
Lead Coder and Designer

Comments

  • This is how I add a scrollView over the whole view
    --get view size
    scrollRect = self:view():frame()
    --make scrollView same size
    self.scroll = UIScrollView:initWithFrame(scrollRect)
    --Don't forget to set how big your content is
    self.scroll:setContentSize(CGSize(320, 550))
    --add the scrollView to the view
    self:view():addSubview(self.scroll)

    Then when adding things to the scrollview I use
    --make button
    self.newBtn = UIButton:buttonWithType(UIButtonTypeRoundedRect)
    --set size and position
    self.newBtn:setFrame(CGRect(100, 100, 60,30))
    --add to scroll view
    self.scroll:addSubview(self.newBtn)

    Because if you just add them to the view itself they wont scroll.
    Also the content size must be bigger than the scrollview in at least the x or the y or it wont scroll.

    Regards,
    Giles
Sign In or Register to comment.