|Jan 22, 2011, 03:46 AM||#1|
Creating a button that adds more text fields?
I'm trying to wrap my head around how to have the application elements that will automatically add text fields and round rectangle buttons to a scroll view and increase the ContentSize of the scroll view as needed to allow for more rows of text fields & round rectangle buttons.
At this point even better google search hints are appreciated.
|Jan 24, 2011, 02:39 AM||#3|
Well to break it down:
1. create a 'round rectangle button' that when pushed, will create a 'text field'.
2. when the button is pressed, the new 'text field' needs to orient with the button, and the button needs to move down out of the way so that the two objects do not overlap
3. the effective dimensions of the scroll view need to expand every time the button is pressed to make room for more text fields.
|Jan 24, 2011, 12:53 PM||#4|
After pressing the button 15 times, you'll have a table of 15 text fields arranged in a single column, with a button below them.
What would you normally use to display a table? UITableView.
So read about that class, and its data source, delegate, and cell relationships. It scrolls. It automatically expands when you insert a cell. It moves cells up or down depending on where you insert the cell. Other than the button below, a UITableView of text fields would be exactly what you want.
So now think about different ways you can make the item below the last text-field a button. Can you place a sub-view there containing the button? Can you make the last table-cell a different cell-type that contains a button? Read the reference docs.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|1Password 4 Detailed for Mac, Adds iCloud Syncing, Encrypted Messaging and Custom Fields||MacRumors||Mac Blog Discussion||122||Sep 2, 2013 11:15 AM|
|Creating button info pop ups||larswik||Mac Programming||5||Jul 24, 2013 05:40 PM|
|How do I make it so editing text fields updates display as I type?||printz||Mac Programming||2||May 5, 2013 01:45 AM|
|Question on delegates and multiple text fields||thedon1||iPhone/iPad Programming||8||Dec 23, 2012 12:43 AM|
|Creating new contact - adds email address to "other"||ddublu||iPhone||11||Oct 1, 2012 12:06 AM|
All times are GMT -5. The time now is 05:44 AM.