Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6113445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:51:36+00:00 2026-05-23T14:51:36+00:00

I’m running into a wall trying to resize the Hosting View. The problem is

  • 0

I’m running into a wall trying to resize the Hosting View. The problem is I either get a full-screen plot or a blank screen. I’m hoping to get some leads to fix this problem:

I’m using Xcode 4 | IOS 4.3 | Recently downloaded core plot using hg:

I have two xib files (MainWindow & my ViewController)
My ViewController.xib file contains two objects: a View and Hosting View both at the same level:
+-View
+-Graph Hosting View

I get no erros in my code, but all I get a blank screen. I’ve searched for 3 days how to get around this problem, but haven’t found something that works.

My xAppDelegate.h

 #import <UIKit/UIKit.h>
  @class CorePlotTestViewController;
  @interface CorePlotTestAppDelegate : NSObject <UIApplicationDelegate> {

  }

  @property (nonatomic, retain) IBOutlet UIWindow *window;
  @property (nonatomic, retain) IBOutlet CorePlotTestViewController *viewController;
  @end

My ViewController.h

#import <UIKit/UIKit.h>
  #import "CorePlot-CocoaTouch.h"
  @interface CorePlotTestViewController : UIViewController <CPTPlotDataSource>
  {
    CPTXYGraph *graph;
    NSMutableArray *dataForPlot;
    CPTGraphHostingView *graphView;
  }
  @property(readwrite, retain, nonatomic) NSMutableArray *dataForPlot;
  @property(nonatomic, retain)IBOutlet CPTGraphHostingView* graphView;

My ViewController.m

 #import "CorePlotTestViewController.h"

  @interface CorePlotTestViewController(private)
  - (void) configureTableHeader;
  @end

  @implementation CorePlotTestViewController

  @synthesize dataForPlot;
  @synthesize graphView;

  -(void)dealloc 
  {
    [dataForPlot release];
    [super dealloc];
  }

  - (void)viewDidLoad {
    [super viewDidLoad];
    [self configureTableHeader];
  }
  - (void) configureTableHeader
  {
  // here I implement the contents of the Hosting View
  graph = [[CPTXYGraph alloc] initWithFrame: CGRectZero];
  CPTGraphHostingView *hostingView = [(CPTGraphHostingView *)[CPTGraphHostingView alloc]  
     initWithFrame:CGRectZero];
  [self.view addSubview:hostingView]; 
  ...
  // etc
  ...
  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:51:36+00:00Added an answer on May 23, 2026 at 2:51 pm

    In your code, you initialize the hosting view using a CGRectZero frame, which is basically a frame with an origin at (0,0) and both a width and a height of 0 px. It is the reason why you don’t see the graph at all when you run your project.

    If you gave a custom size and location to the hosting view in Interface Builder, it is overridden by this code.
    By the way, I’m not sure why you want to add the hosting view to the controller’s view in the code. You just need to layout both components using Interface Builder, giving the hosting view the size and the location you want it to have.

    Last thing : why do you add a ‘T’ to Core-Plot class names ? CPTPlotDataSource should simply be CPPlotDataSource; CPTXYGraph: CPXYGraph; etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.