Re: Problem using 'whenPinched' with custom UIView

38 views
Skip to first unread message
Message has been deleted
Message has been deleted
Message has been deleted

Francis Chong

unread,
Jul 16, 2012, 2:13:43 AM7/16/12
to bubbl...@googlegroups.com
Its more fun to find it yourself isn't it? I have added an quick sample to show how it would work with bubble-wrap: https://github.com/rubymotion/BubbleWrap/commit/a67a20a0c9ce1e9b9d89bf44231c2699ca52c034

On Sunday, July 15, 2012 11:05:04 PM UTC+8, Kenny Meyer wrote:
I got it working, now! Though not using BubbleWrap. Maybe a next time!

On Sunday, July 15, 2012 10:43:39 AM UTC-4, Kenny Meyer wrote:
I think I have tried everything... quite frustrating, and seemingly nobody is willing to help. :(

On Saturday, July 14, 2012 9:33:44 PM UTC-4, Kenny Meyer wrote:
Hello,

I am a new to iOS, but have some knowledge of Ruby.

So, in my project I use BubbleWrap gesture helpers, and I am trying to run a method whenever my view is pinched, so I have the following code in my controller:

  def loadView
    self.face_view = FaceView.alloc.init
    self.face_view.setNeedsDisplay()
    self.face_view.whenPinched do
      self.face_view.pinch(gesture)
    end
  end

And the corresponding `pinch` method in my custom UIView:

  def pinch(gesture)
    NSLog "Pinch gesture..."
    if (gesture.state == UIGestureRecognizerStateChanged) ||
       (gesture.state == UIGestureRecognizerStateEnded)
      @scale *= gesture.scale
      gesture.scale = 1
    end
  end

Anyways, the method doesn't get called when the view is being pinched. :(

Any hints are welcome!

My code can be found here: https://github.com/kennym/stanford-iOS-class/tree/master/lec-05-happiness/happiness/app

Cheers,
Kenny

Matt Aimonetti

unread,
Jul 16, 2012, 2:49:22 AM7/16/12
to bubbl...@googlegroups.com
Kenny, BubbleWrap is a Free Open Source Software project. A lot of people have contributed a great amount of work hours to create this library.
The end result is that you can just pick up what we've done and use it to create software for yourself, your company or some clients, all that for free.

You posted a not so simple problem over the weekend and 15 hours later you are back to complain that you didn't receive the attention you think it deserves.
Have you waited a little bit longer and you would have gotten the amazing sample written for you, for free that Francis just contributed.

I understand you were frustrated but I think your comment was very unfair and certainly unwelcome. 
The entire team is open to criticism and suggestions as we proved many times, but I think your expectations are just unrealistic.

Now that you had a great solution provided to you by our team, I'm looking forward to your contribution.

Sincerely,

- Matt
Reply all
Reply to author
Forward
0 new messages