Monday, February 14, 2011

Setting the position of UIScrollView

If you have a form like adding contact or event etc., then you need to scroll your view according to the position of your textfield. Because keyboard or picker view will probably hides it if you don't. One easy way to do is to set the content offset of your UIScrollView as follows when you click the textfield:

[scrollView setContentOffset:CGPointMake(x, y) animated:YES];

1 comment:

  1. Thank very useful, however need more thing to implement, but good.

    ReplyDelete