Why a uitextfield inside a uiscroll view doesn't scroll?

I have a scrollview which contains a text field and a text view. I would that both two scrolled together. How can I do? Now only the text view scroll.

Precisely, I would that the title scrolls up while the user writes in the textview and, if the user decides to set it, he can scrolls up and refind the textfield.



try this

in .h

IBOutlet UIScrollView *scrollView;

and connect it in the interface builder and in your .m file put this into your viewDidLoad

     [scrollView setScrollEnabled:YES];
     [scrollView setFrame:CGRectMake(0,55,320,180)];
     [scrollView setContentSize:CGSizeMake(320,320)];

then put your textField and your textView inside the scroolView in the interface builder

I want to say one thing,

Here the textfield can have only one line and the textview has multi-line of data. So in your contest both will scroll, but you are saying one is scrolling and other is not.

In this what I am expecting is scrollview is not scrolling but the text view is showing its data(content).

Thats it.

If you want to check this, increase the textview frame upto its content and put userInteractionEnabled as NO and then set the scrollview content size to some what more than the textview size. Then you can observe both are scrolling.



Need Your Help

Why is my Windows Forms application changing size across computers?

c# winforms visual-studio-2010

I've been developing a Windows Forms application with a Windows Media Player COM embedded into it. Normally, it looks like this:

Rails paperclip file upload field not working - multiple choice image upload

ruby-on-rails ruby ruby-on-rails-3 paperclip

I am having some problem with uploading images with my file upload field. It does not upload anything. But the image url field works. I think it have some to do with my model.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.