IPhone app use core-plot (What to fix)? - iphone

i'm making iphone app that use Core-Plot chart. The app have "SavolaViewController as a main class that include a button and when button clicked it's GoTo to another class named "ChartViewController" by this code
ChartViewControllerVar = [[ChartViewController alloc]initWithNibName:#"ChartViewController" bundle:nil];
[self presentModalViewController:ChartViewControllerVar animated:YES];
I have read about core-plot for 4-6 hours and i have not understand any of the tutorials(it's not understandable) [({"Please dont answer with tutorial link"})]
I have coped the Core-Plot code from the example in Core-Plot .zip file(you'll find the code in the link bellow).
and i have this msg in the console
2012-07-15 16:38:31.325 Savola[13105:f803] * Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason:
'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the
"ChartViewController" nib but the view outlet was not set.'
* First throw call stack: (0x140a022 0x19c2cd6 0x13b2a48 0x13b29b9 0x4102dd 0x410779 0x41099b 0x4199bc 0x414818 0x630565 0x417857
0x4179bc 0xca94792 0x4179fc 0x9a4f 0x3da5c5 0x3da7fa 0xc6f85d
0x13de936 0x13de3d7 0x1341790 0x1340d84 0x1340c9b 0x228f7d8 0x228f88a
0x349626 0x8c0a 0x2c55) terminate called throwing an exception(lldb)
What i want(If you can)
Fix the code to run in my app.
What does i need to but in the .xib file.
delete the codes unneeded.
The code

This has nothing to do with Core Plot. You have an IBOutlet in your .xib that's not connected properly.

Related

My app crashes and does not change views when I tell it to

My app crashes and does not change views when I tell it to. I have tried many other things but I can not get it to change programmatically for the life of me. I have attached my Workspace. Any help would be great!!!
Image
This code changes the view to this
self.messagesController?.setupNavBarWithUser(user)
How do I go to this view in my storyBoard correctly.
Here is my error code
2018-12-17 07:56:00.777229-0500 Kind Point[7129:524001] ***
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Could not find a storyboard
named 'MessagesController' in bundle NSBundle
</Users/Jake/Library/Developer/CoreSimulator/Devices/C748FA7B-1F41-49C3-8A72-F3A39E494146/data/Containers/Bundle/Application/C824E34D-60DB-4CEC-8FEF-9BC939AF20C8/Kind
Point.app> (loaded)'
*** First throw call stack:
If you are using buttons, I suggest disconnecting the outlet/remove the segue from the button and re-add it.
Your terminal log says that there is no storyboard named MessagesController so, try adding a new view, or swift file and name it MessagesController. Add the messagesController to the view controller and see if it works.
To add a new view controller file to a storyboard, just copy and paste the code from one view controller and paste it to a new swift file. Then, change the name in the top of the code from ViewController, to the name of the view controller you want.

Error After Duplicating Storyboard

Previously i had an existing iphone project.
Afterwards i want to create its iPad version so I duplicated the existing iPhone MainStoryboard to save my time, so I changed the line:
targetRuntime="iOS.CocoaTouch"
from the new storyboard (named MainStoryboard_iPad) to:
targetRuntime="iOS.CocoaTouch.iPad".
Finally I set Main Storyboard in iPad Development info to "MainStoryboard_iPad. But I don''t know why some how i got this error:
2012-10-11 13:28:07.852 CollViewSmpl[3170:c07] * Assertion failure in -[PSUICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2372/UICollectionView.m:2249
2012-10-11 13:28:07.878 CollViewSmpl[3170:c07] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier cellID - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
Anyone know what could cause this error and give me some workarounds? FYI, I use open source PSUICollectionView library inside the project in place of UICollectionView
That inconsistence error is because the storyboard source code were not being saved properly. Finally i created a new storyboard document targeted for iPad. I copied all source code of the preexisting iPhone storyboard and pasted them into the new one. I didn't forget to save the document (this is important) and gotcha, all the stuffs are now working very well.

UISplitViewController with NavigationControllers (including sample code)

The easiest way to see this problem will be to run the sample project here:
http://drop.io/stackproblem
Basically, It's a uisplitviewcontroller which can be switched between 2 detail views, both of which are navigation controllers.
The problem is that it crashes with the following error:
MultipleDetailViews[8531:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Popovers cannot be presented from a view which does not have a window.'
It crashes with this error if you use the app in PORTRAIT and you navigate (still in portrait) from the first controller, to the second, to the first, to the second, and then boom CRASH using the popover controller.
One way to stop the crash is to stop lazy loading the navigation controllers and to load them fresh everytime but this isn't an option for the app I'm making.
Any ideas and I may fall in love.
Try using if (self.view.window != nil) just before the line that's causing the crash.

Universal app iPad version IBAction throwing NSInvalidArgumentException unrecognized selector

For some reason I cannot figure out I have an IBAction code wired up to fire on the touchupinside for a UIButton on a view using Interface Builder. Simple stuff right?? Well it works fine in my iphone version but for some reason I keep getting the following error when I click on the button in the iPad even though I have it wired up properly. IB has the the correct class name for files owner, it's wired to the action. I've checked and double checked my connections, rewired them from scratch, cleaned classes, deleted the app from the simulator and googled to the end of the internets.
Why would this be any different between ipad and iphone version? Can someone please help me before I go insane on something that should be working but just refuses to work???? Even weirder it seems whatever I try to wire up to an action is throwing a similar error. I'm starting to think Interface Builder is just crazy or something.
2010-08-15 14:19:13.372 AppName[28524:207] * -[UIViewController doClick]: unrecognized selector sent to instance 0x4d7fac0
2010-08-15 14:19:13.373 AppName[28524:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIViewController doClick]: unrecognized selector sent to instance 0x4d7fac0'
UIViewController doesn't respond to doClick: which is what you are seeing here.
In the nib file for your view, have you set the "File's Owner" to the class that you inherit from UIViewController and contains the doClick: method?

Connection fault in IB

I have a Tab Bar application with four new headers, implementation and interface files, and added those as the sources in IB. They were in this format: FirstView.h/m/xib, SecondView.h/m/xib.
I then had files for First-, Second-, Third- and FourthView.
There was also a file there called FirstViewController. I did not touch this, I just deleted it because I wasn't going to need it.
I then laid out my interface for the first view (FirstView.h/m/xib) in IB. It had an image on the top, label under and a UITableView under that.
I sat up the correct connections (delegations and datasource for the tableview) in my FirstView.h/m file, and pressed Build. It seemed to build without errors, so I pressed Build and Go.
The Simulator popped up, installed the app and crashed. (Error message:Terminating app due to uncaught exception).
Complete error message:
2010-02-06 21:50:54.733 Mudo[52439:207] *** -[FirstViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x39101a0
2010-02-06 21:50:54.735 Mudo[52439:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[FirstViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x39101a0'
2010-02-06 21:50:54.736 Mudo[52439:207] Stack: (**LotsOfNumbers**)
I asked about this in another question, got an answer, and that fixed it:
It was obviously looking for code in the FirstViewController.h/m-file, although I did not do anything to make it look for code there.
I fixed this by adding two interfaces and implementations in my FirstView.h/m file. (FirstView and FirstViewController)
When I ran the app then, the table view and tab bar came up on the screen, but my image and label did NOT.
I don't have any idea of why it was looking for the code in FirstViewController instead of FirstView... I have the correct connections in IB, too..
A tableview is trying to query its data source for the number of rows it should display. If you've connected the tableview's datasource outlet to an instance of your FirstViewController class, then you need to implement -tableView:numberOfRowsInSection: in that class.