Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd a bunch of controls dynamically to screen in iOS
    primarykey
    data
    text
    <p>I am working on a screen where user selects an option from drop-down. Based on this selection he adds a bunch of controls to screen. My drop-down is at the bottom-right corner of the screen. It takes up 20-25% of screen space at the bottom. In the remaining 75% screen at the bottom i need to add 9 labels,6 UItext fields ,2 drop-downs and 2 buttons. I am attaching a markup here. </p> <p>My question is: in ASP.NET, I have a repeater which has all the above controls. In one of the buttons named "Add More". If I click that button, it adds the same repeater at the bottom of the current one. Do we have anything like that in iOS? Like a repeater which has a bunch of controls and click add and that exact repeater is added at the bottom and so-on and so forth. If any ideas/new ideas based on my explanation pop-up then please let me know. Thanks. </p> <p>The link <a href="http://dl.dropbox.com/u/40597849/mockup2.png" rel="nofollow">http://dl.dropbox.com/u/40597849/mockup2.png</a> </p> <p>So, the big rectangle to the right containing 8 labels, textboxes, drop-downs and the 2 buttons below it(one is named as "Add More") should be added again when user clicks on Add More. Please ask me if you need more information. </p> <pre><code>ITMCustomView *cView = [[ITMCustomView alloc] initWithFrame:frame]; cView.delegate =self; CGPoint scrollPoint = CGPointMake(0.0, (frame.origin.y/400)*400); [self.scrollView setContentOffset:scrollPoint animated:YES]; [self.scrollView addSubview:cView]; </code></pre> <p>Initially the very first custom view i add, i add it with this frame size (187, 585, 350, 21); . Next whenever i hit add more i call this delegate</p> <pre><code>[self.delegate addNewSize:CGRectMake(187,self.y+ 400 , 400, 400)]; </code></pre> <p>This calls the above 5 lines of code and makes a new custom view and adds it to scroll view. I store the self.y as the y value of whatever frame currently being built. So how do i make my scroll view move up and down freely. The screen shows the custom view as they are added but doesnt allow me to go up anymore. I wanted to suppose add the custom view 5 times and i added 4 i just want to scroll up , see i added 4 scroll down and just add 1 more custom view and do other processing with it. But my scroll view is non-functional and its stuck at the just added custom view disabling me to scroll up. If you need more information, please ask me. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload