Objective C to C#

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Objective C to C#

mgmiphone

Trying to convert the following in C# can anyone help?

 

if (!CGRectContainsPoint(aRect, activeField.frame.origin) ) {

        CGPoint scrollPoint = CGPointMake(0.0, activeField.frame.origin.y-kbSize.height);

        [scrollView setContentOffset:scrollPoint animated:YES];

    }

 

Thanks

Michael Murdock

AllMeds

 


_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|

Re: Objective C to C#

Nic Wise
Hi Mike

This should do it :)

            if (arect.Contains(activefield.Frame.Origin))
            {
                var scrollpoint = new PointF (0f, activeField.Frame.Y - kbSize.Height);
                
                scrollView.SetContentOffset (scrollpoint, true);
            }
 

 


On 19 April 2013 10:02, Mike Murdock <[hidden email]> wrote:

Trying to convert the following in C# can anyone help?

 

if (!CGRectContainsPoint(aRect, activeField.frame.origin) ) {

        CGPoint scrollPoint = CGPointMake(0.0, activeField.frame.origin.y-kbSize.height);

        [scrollView setContentOffset:scrollPoint animated:YES];

    }

 

Thanks

Michael Murdock

AllMeds

 


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




--
Nic Wise
t.  +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|

Re: Objective C to C#

Nic Wise
BTW, was good meeting you at Evolve! I hope you had a good time :)


On 19 April 2013 11:22, Nic Wise <[hidden email]> wrote:
Hi Mike

This should do it :)

            if (arect.Contains(activefield.Frame.Origin))
            {
                var scrollpoint = new PointF (0f, activeField.Frame.Y - kbSize.Height);
                
                scrollView.SetContentOffset (scrollpoint, true);
            }
 

 


On 19 April 2013 10:02, Mike Murdock <[hidden email]> wrote:

Trying to convert the following in C# can anyone help?

 

if (!CGRectContainsPoint(aRect, activeField.frame.origin) ) {

        CGPoint scrollPoint = CGPointMake(0.0, activeField.frame.origin.y-kbSize.height);

        [scrollView setContentOffset:scrollPoint animated:YES];

    }

 

Thanks

Michael Murdock

AllMeds

 


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




--
Nic Wise
t.  <a href="tel:%2B44%207788%20592%20806" value="+447788592806" target="_blank">+44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/



--
Nic Wise
t.  +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/

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