An extra UIView in my projects view controller?

Discussion in 'iOS Programming' started by JamerTheProgram, Nov 6, 2011.

  1. JamerTheProgram macrumors member

    Aug 6, 2011
    One Infinite Lo- I've said too much...
    I have an app that has 1 extra UIView integrated into the the myprojectsViewController view.
    This is how it is:
    The second UIView is resized and positioned at the top of the main view.
    So then, I can change the type of the extra view to a core plot view (But to keep things simple im just going to say UIView instead).
    Here is how im trying to get it to work:
    Open myProjectsViewController.xib with Interface Builder.
    Drag another UIView onto the original main UIView and resize it to the desired size and position.
    Then I click on the view that I just customised and press file and then Write Class Files.
    But then the code does not get executed.
    I put the code in the classes that the Write Class Files option in Interface Builder made for me.

    For example in secondViewThatsIntergratedIntoTheMainView.m:
    -(void) viewDidLoad{
    [super viewDidLoad];

    It will not log to the console.
    So basically its a class not even related to the UIView.

    The app is supposed to work like this:
    The main view will have a bar chart at the top of it(Which is the need for an extra UIView) and at the bottom it will have normal UILabels (YOu cannot have them in Core Plot Views.)
    I would be so damn grateful if any of you could help me out with this problem!
    Please (I really do appreciate it) explain in detail as Im a bit new to this iPhone Development stuff!
    Thanks very very very very very much for your time.
  2. admanimal macrumors 68040

    Apr 22, 2005
    Make sure you understand the difference between a view (UIView) and a view controller (UIViewController).
  3. JamerTheProgram thread starter macrumors member

    Aug 6, 2011
    One Infinite Lo- I've said too much...
    All I want is a UIView at the top of the main UIView so I can make the UIView at the top do something different to the main one (The view at the top of the main view is going to be a Core Plot view, but I know how all that works, so to keep things simple im just saying UIView)
    I read up on the differences, and you have honestly saved me alot of confusion. So, how do I get a View Controller for the second view that is integrated into the main view?

Share This Page