Re: Question about touchesBegan

2009-12-16 Thread Benjamin Stiglitz
> I'll elaborate a little more. I have a main view with some source buttons
> (UIButton) at the top. When I click one, I bring up a radio style tuner bar
> in a subview (animates up from the bottom). I am using touches to move the
> "pointer" in that subView. Works great, however because the subView is
> detecting touches for the whole subView - it prevents touches on those
> buttons in the main view. Do I simply need to architect this in another way?
> Say create a subview of just the UIButtons at the top of all subViews?

That would work. You could also override -hitTest:withEvent:.

-Ben
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-10 Thread Eric E. Dolecki
Yup - setting the bounds is working. So I can have touches in my main view
and also in the sub view. Coming from Flash AS3, this stuff seems so
complicated in comparison.

On Thu, Dec 10, 2009 at 8:57 AM, Alexander Spohr  wrote:

>
> Am 10.12.2009 um 14:46 schrieb Eric E. Dolecki:
>
> > What I am trying to do now is when I create the subView with the tuner
> bar, I am setting it's view's bounds to something much smaller than the
> whole screen and then animating it up. I think this approach might work.
>
> I thought you did that already...
> If not - it helps.
>
>atze
>
>


-- 
http://ericd.net
Interactive design and development
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-10 Thread Alexander Spohr

Am 10.12.2009 um 14:46 schrieb Eric E. Dolecki:

> What I am trying to do now is when I create the subView with the tuner bar, I 
> am setting it's view's bounds to something much smaller than the whole screen 
> and then animating it up. I think this approach might work.

I thought you did that already...
If not - it helps.

atze

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-10 Thread Eric E. Dolecki
What I am trying to do now is when I create the subView with the tuner bar,
I am setting it's view's bounds to something much smaller than the whole
screen and then animating it up. I think this approach might work.

On Thu, Dec 10, 2009 at 8:29 AM, Eric E. Dolecki  wrote:

> I'll elaborate a little more. I have a main view with some source buttons
> (UIButton) at the top. When I click one, I bring up a radio style tuner bar
> in a subview (animates up from the bottom). I am using touches to move the
> "pointer" in that subView. Works great, however because the subView is
> detecting touches for the whole subView - it prevents touches on those
> buttons in the main view. Do I simply need to architect this in another way?
> Say create a subview of just the UIButtons at the top of all subViews?
>
> - Eric
>
> On Thu, Dec 10, 2009 at 2:12 AM, Alexander Spohr  wrote:
>
>> Um, have to follow up to myself...
>>
>> Am 10.12.2009 um 08:02 schrieb Alexander Spohr:
>>
>> > Am 10.12.2009 um 04:34 schrieb Eric E. Dolecki:
>> >
>> >> Well - I wonder if it's possible to enable touches in a sub view but
>> not for
>> >> the entire view - just part of it.
>> >>
>> >> I have a view with buttons in it. I call up a sub view that requires
>> touches
>> >> for swiping... I want the buttons in the view below to still register
>> touch
>> >> events for that entire view.
>> >
>> > Usually the superview of the buttons would handle swipes.
>> > If you have buttons put them on top (as a subview) of your swipe
>> receiver.
>> >
>> > Or - as was pointed out - let the controller catch all touches.
>>
>> If your swipe view and buttons are in the same hierarchy
>>
>> - (void)bringSubviewToFront:(UIView *)view
>> - (void)sendSubviewToBack:(UIView *)view
>>
>> should help.
>>
>> But as these are in the docs of UIView I am sure you already found them.
>> ;)
>>
>>atze
>>
>>
>
>
> --
> http://ericd.net
> Interactive design and development
>



-- 
http://ericd.net
Interactive design and development
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-10 Thread Eric E. Dolecki
I'll elaborate a little more. I have a main view with some source buttons
(UIButton) at the top. When I click one, I bring up a radio style tuner bar
in a subview (animates up from the bottom). I am using touches to move the
"pointer" in that subView. Works great, however because the subView is
detecting touches for the whole subView - it prevents touches on those
buttons in the main view. Do I simply need to architect this in another way?
Say create a subview of just the UIButtons at the top of all subViews?

- Eric

On Thu, Dec 10, 2009 at 2:12 AM, Alexander Spohr  wrote:

> Um, have to follow up to myself...
>
> Am 10.12.2009 um 08:02 schrieb Alexander Spohr:
>
> > Am 10.12.2009 um 04:34 schrieb Eric E. Dolecki:
> >
> >> Well - I wonder if it's possible to enable touches in a sub view but not
> for
> >> the entire view - just part of it.
> >>
> >> I have a view with buttons in it. I call up a sub view that requires
> touches
> >> for swiping... I want the buttons in the view below to still register
> touch
> >> events for that entire view.
> >
> > Usually the superview of the buttons would handle swipes.
> > If you have buttons put them on top (as a subview) of your swipe
> receiver.
> >
> > Or - as was pointed out - let the controller catch all touches.
>
> If your swipe view and buttons are in the same hierarchy
>
> - (void)bringSubviewToFront:(UIView *)view
> - (void)sendSubviewToBack:(UIView *)view
>
> should help.
>
> But as these are in the docs of UIView I am sure you already found them. ;)
>
>atze
>
>


-- 
http://ericd.net
Interactive design and development
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread Alexander Spohr
Um, have to follow up to myself...

Am 10.12.2009 um 08:02 schrieb Alexander Spohr:

> Am 10.12.2009 um 04:34 schrieb Eric E. Dolecki:
> 
>> Well - I wonder if it's possible to enable touches in a sub view but not for
>> the entire view - just part of it.
>> 
>> I have a view with buttons in it. I call up a sub view that requires touches
>> for swiping... I want the buttons in the view below to still register touch
>> events for that entire view.
> 
> Usually the superview of the buttons would handle swipes.
> If you have buttons put them on top (as a subview) of your swipe receiver.
> 
> Or - as was pointed out - let the controller catch all touches.

If your swipe view and buttons are in the same hierarchy

- (void)bringSubviewToFront:(UIView *)view
- (void)sendSubviewToBack:(UIView *)view

should help.

But as these are in the docs of UIView I am sure you already found them. ;)

atze

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread Alexander Spohr

Am 10.12.2009 um 04:34 schrieb Eric E. Dolecki:

> Well - I wonder if it's possible to enable touches in a sub view but not for
> the entire view - just part of it.
> 
> I have a view with buttons in it. I call up a sub view that requires touches
> for swiping... I want the buttons in the view below to still register touch
> events for that entire view.

Usually the superview of the buttons would handle swipes.
If you have buttons put them on top (as a subview) of your swipe receiver.

Or - as was pointed out - let the controller catch all touches.

atze

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread Eric E. Dolecki
Well - I wonder if it's possible to enable touches in a sub view but not for
the entire view - just part of it.

I have a view with buttons in it. I call up a sub view that requires touches
for swiping... I want the buttons in the view below to still register touch
events for that entire view.

On Wed, Dec 9, 2009 at 9:32 PM, Henry McGilton (Boulevardier) <
appledevelo...@trilithon.com> wrote:

>
> On Dec 9, 2009, at 5:58 PM, Eric E. Dolecki wrote:
>
> > Is there a way to define the touchesBegan in an added sub view to
> > be constricted to a certain area and not allObjects? Thus leaving a
> "hole"
> > to allow touches to be fired on the view below?
>
> If I interpret your question correctly, you want the added sub-view to NOT
> handle touches?
>
> If so, don't implement the touchesBegan/Moved/Ended methods in that
> sub-view.
>
> Alternatively, simply disable user interaction for that sub-view.
>
> Even more alternatively, I have found in many cases that handling touches
> in the View Controller
> that manages the view hierarchy makes life easier.You receive a touch
> and simply ask what
> view it landed in.
>
>
>Cheers,
> . . . . . . . .Henry
>
>
>
>
>


-- 
http://ericd.net
Interactive design and development
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread Henry McGilton (Boulevardier)

On Dec 9, 2009, at 5:58 PM, Eric E. Dolecki wrote:

> Is there a way to define the touchesBegan in an added sub view to
> be constricted to a certain area and not allObjects? Thus leaving a "hole"
> to allow touches to be fired on the view below?

If I interpret your question correctly, you want the added sub-view to NOT 
handle touches?

If so, don't implement the touchesBegan/Moved/Ended methods in that sub-view.

Alternatively, simply disable user interaction for that sub-view.

Even more alternatively, I have found in many cases that handling touches in 
the View Controller
that manages the view hierarchy makes life easier.You receive a touch and 
simply ask what
view it landed in.


Cheers,
. . . . . . . .Henry




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread Eric E. Dolecki
Is there a way to define the touchesBegan in an added sub view to
be constricted to a certain area and not allObjects? Thus leaving a "hole"
to allow touches to be fired on the view below?

On Wed, Dec 9, 2009 at 5:53 PM, glenn andreas  wrote:

>
> On Dec 9, 2009, at 4:19 PM, Jack Carbaugh wrote:
>
> > So in this case, would the SUBview want to send the SUPERview the
> touchesbegan event ?
> >
>
> >From the documentation (iPhone Application Programming Guide > Event
> Handling > Touch Events > Handling Multi-Touch Events > Forwarding Touch
> Events):
>
>
> Forwarding Touch Events
> Event forwarding is a technique used by some applications. You forward
> touch events by invoking the event-handling methods of another responder
> object. Although this can be an effective technique, you should use it with
> caution. The classes of the UIKit framework are not designed to receive
> touches that are not bound to them; in programmatic terms, this means that
> the view property of the UITouch object must hold a reference to the
> framework object in order for the touch to be handled. If you want to
> conditionally forward touches to other responders in your application, all
> of these responders should be instances of your own subclasses of UIView.
>
>
>
> It's definitely worth reading, and re-reading, those docs - all sorts of
> nice explanations of how touch handling is handled can be found there...
>
>
> Glenn Andreas  gandr...@gandreas.com
>   wicked fun!
> Mad, Bad, and Dangerous to Know
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/edolecki%40gmail.com
>
> This email sent to edole...@gmail.com
>



-- 
http://ericd.net
Interactive design and development
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread glenn andreas

On Dec 9, 2009, at 4:19 PM, Jack Carbaugh wrote:

> So in this case, would the SUBview want to send the SUPERview the 
> touchesbegan event ?
> 

>From the documentation (iPhone Application Programming Guide > Event Handling 
>> Touch Events > Handling Multi-Touch Events > Forwarding Touch Events):


Forwarding Touch Events
Event forwarding is a technique used by some applications. You forward touch 
events by invoking the event-handling methods of another responder object. 
Although this can be an effective technique, you should use it with caution. 
The classes of the UIKit framework are not designed to receive touches that are 
not bound to them; in programmatic terms, this means that the view property of 
the UITouch object must hold a reference to the framework object in order for 
the touch to be handled. If you want to conditionally forward touches to other 
responders in your application, all of these responders should be instances of 
your own subclasses of UIView.



It's definitely worth reading, and re-reading, those docs - all sorts of nice 
explanations of how touch handling is handled can be found there...


Glenn Andreas  gandr...@gandreas.com 
  wicked fun!
Mad, Bad, and Dangerous to Know

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread Jack Carbaugh
So in this case, would the SUBview want to send the SUPERview the  
touchesbegan event ?


On Dec 9, 2009, at 4:10 PM, Alexander Spohr wrote:



Am 09.12.2009 um 20:32 schrieb Eric E. Dolecki:

I have a main view that uses touchesBegan. I call up and display a  
subView

on top of the main view, and that subView has it's own touchesBegan.

The subView obstructs the touchesBegan in the main view. Is this  
expected?



Yes. Otherwise no subview of the window would ever get any touches...

Sub does not mean below :)

   atze


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/intrntmn%40aol.com

This email sent to intrn...@aol.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about touchesBegan

2009-12-09 Thread Alexander Spohr

Am 09.12.2009 um 20:32 schrieb Eric E. Dolecki:

> I have a main view that uses touchesBegan. I call up and display a subView
> on top of the main view, and that subView has it's own touchesBegan.
> 
> The subView obstructs the touchesBegan in the main view. Is this expected?


Yes. Otherwise no subview of the window would ever get any touches...

Sub does not mean below :)

atze


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Question about touchesBegan

2009-12-09 Thread Eric E. Dolecki
I have a main view that uses touchesBegan. I call up and display a subView
on top of the main view, and that subView has it's own touchesBegan.

The subView obstructs the touchesBegan in the main view. Is this expected?



-- 
http://ericd.net
Interactive design and development
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com