Thanks for clarification Adam!

On Nov 16, 2012, at 6:00 PM, Adam Kemp <[email protected]> wrote:

> You should not be calling MovedToWindow directly. That function is called 
> automatically by AddSubview.
> 
> ExclusiveTouch changes the behaviors of gestures, but only for 
> multi-touch. What it means is if a view with ExclusiveTouch set to true is 
> already receiving one or more touches then no other view will receive 
> touch events. Also, if another view is already receiving one or more 
> touches then a view with ExclusiveTouch will not receive any touch events 
> while those touches are still active. It is a way to prevent things like 
> pressing two buttons at the same time.
> 
> If you want to show something modally then you should consider making it a 
> view controller and actually using the PresentModalViewController method 
> (or one of the other view controller presentation methods). Those 
> automatically prevent touches to other views until your view controller is 
> dismissed. Otherwise you can do what Nic suggested and add another 
> (invisible or semi-transparent) view behind the "modal" one. That other 
> view just steals touches so that they don't reach the other views behind 
> it.
> --
> Adam Kemp
> [email protected]
> (512) 683-6058
> 
> [email protected] wrote on 11/16/2012 06:56:16 AM:
> 
>> From: Iki <[email protected]>
>> To: "[email protected]" <[email protected]>, 
>> Date: 11/16/2012 06:56 AM
>> Subject: [MonoTouch] Restrict interaction to UIView only …?
>> Sent by: [email protected]
>> 
>> Hi everyone,
>> 
>> Does anyone know how to restrict gestures (any kind of interaction) 
>> to UIView? What i would like to do is that on a button press, I'm 
>> loading new UIView, lets say on the centre of the screen, and i want
>> modal presenting style, so that the user can't do anything else 
>> while this view is active.
>> 
>> I did try following:
>> 
>>   _view -> UIView that I'm presenting
>> 
>> So, 
>> 
>>   _view.BecameFirstResponder();
>>   _view.ExclusiveTouche = true;
>>   _view.MovedToWindow();
>> 
>> But all of the buttons bellow this view can be pressed, is there a 
>> way to avoid that? One of my ideas was to load transparent view 
>> across whole screen, but it must be a better solution i think.
>> 
>> Well thanks for all your help, past and current!
>> 
>> 
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/monotouch
> 
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch

_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to