Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First off, only one UIViewController per screen. Period. From there you will want two subviews added to UIViewController's main view (the one that's loaded in viewDidLoad). To put this into web terms think of the view controller's view as <code>&lt;body&gt;&lt;/body&gt;</code>.</p> <p>In the end you'll probably want something like this.</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 45.0)]; // Further configure your scroll view as you presumably already have in ListingDetails [self.view addSubview:scrollView]; [scrollView release]; UIView *staticView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 45.0, 320.0, 435.0)]; [self.view addSubview:staticView]; [staticView release]; } </code></pre> <p>Edit: Setting this up in Interface Builder</p> <p>In your view controller's .h</p> <pre><code>@interface SampleViewController : UIViewController { UIScrollView *scrollView; UIView *staticView; } @property (nonatomic, retain) IBOutlet UIScrollView *scrollView; @property (nonatomic, retain) IBOutlet UIView *staticView; @end </code></pre> <p>and in the .m file</p> <pre><code>@implementation SampleViewController @synthesize scrollView; @synthesize staticView; - (void)viewDidUnload { [super viewDidUnload]; self.scrollView = nil; self.staticView = nil; } - (void)dealloc { [scrollView release], self.scrollView = nil; [staticView release], self.staticView = nil; [super dealloc]; } @end </code></pre> <p>Now in the Interface Builder file, you can right-click and drag from File's Owner (that's your UIViewController subclass) directly to the views on screen. When you release a popup will appear and you choose the property in the code you want to connect that view to. Once this is established you can reference those views in code like so.</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; // Assume we need to make some tweaks once the view has loaded self.staticView.backgroundColor = [UIColor redColor]; self.scrollView.backgroundColor = [UIColor blackColor]; } </code></pre>
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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