I am having an issue with my Core Data app and I could probably figure it out if I could look at a good example. I have searched the web and I have only been able to find the same examples like Random Dates which is pretty much useless and only has one View Controller. I am looking for a Core Data app using multiple levels and real information, not random date inserts.
Thanks in advance
Marc Zarra, Core Data guru, has some helpful blog posts that might get you a little bit closer. Try starting here to get you started. This is just one way to go about it. I'm using a shared managed object context via a shared instance of my app controller, so all I have to do is call something like this from a view controller to start accessing my CD object:
AppController *ac = [AppController sharedAppController];
NSManagedObjectContext *moc = [ac managedObjectContext];
I can't find the relevant links right now, but I have a feeling that idea might have come out of the Big Nerd Ranch iPhone dev book. I hope this helps get you going on the right path for what you need.
Related
I'm learning to develop cocoa apps, yet I'm jumping straight to Core Data. Well, it seems to be the right way to write the app I want. So, I've been looking into Magical Record and found this really helpful tutorial which explains how to setup Magical Record on your AppDelegate.
Problem is I'm building a document-based app, so I have a context per NSPersistentDocument which is magically setup and available for me through the managedObjectContext property.
So, first, I don't know if I should hook up MR to this context or override the Core Data's stack creation in my document class to use MR.
So how do I setup Magical Record here?
I'm an Objective-C newbie. Most of my experience is in Java. Also, I've never really used Xcode before and so I'm pretty new at that as well.
I'm trying to create a simple, single-view Quartz OS X app (not iOS) to display agent-modeling simulations. The graphics are pretty simple; just colored squares and grids. I have been looking at Quartz tutorials and I can see how I could accomplish this (as far as drawing things are concerned). What I can't find is an example that tells me how to tie it all together. What do I put in AppDelegate? Do I need a WindowController? How do I link that up with AppDelegate? I got as far as creating a Quartz Composer View in Interface Builder for my app, but I have no idea where to go from there.
As I mentioned before, I've looked for numerous tutorials but there is nothing that I can find that gives me information as far as linking everything together.
You should visit this web page before you do anything else. It will show you how a Cocoa application is structured and where the appropriate entry points are to place your code.
While the entire article merits reading, visit the section "Entry and Exit Points," which best addresses your particular questions.
I'm developing a typical "Windows GUI" based app for iPhone using MONO technologies. I need to add a little AR based functionality to it. It is just about opening up the camera, and showing information to the user regarding nearby businesses.
How can I do this using mono?
Of course it is possible. I have created a project and works very nice. It is quite complicated and I would need three pages to explain it and, the time to do it which I do not have.
In general, you need to look into:
CLLocationManager for location and
compass.
MapKit, if you want to provide
reverse geocoding information.
Implement an overlay view over the
UIImagePickerController which will
act as your canvas.
And of course, drawing.
I hope these guidelines will get you started.
Can anyone help me, I'm a n00b at this and still learning.
I simply need to load an XML file into a table view and add a search function to it which filters the table view. I was looking for a tutorial on this or some sample code.
This is for a Mac app.
Here is the apple tableview guide
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TableView/TableView.html
and here is the NSXML guide
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/NSXML_Concepts/NSXML.html
If you look at my post here I am using a NSURL connection to get local xml, in place of a web service.
Accessing Local file using NSURL
I would strongly suggest getting a copy of the Big Nerd Ranch iOS programming guide, it covers exactly what I think you want to do near the end of the book.
I have found a Tutorial here
on how to implement drag and drop in an Outline View. The only problem I have is I don't know where to put the code from the tutorial. I would appreciate it greatly if you could tell me where I should put the code in a Xcode Project to make it work. Thanks!
You might want to check out this tutorial as well (there is also a part two which details unordered trees).
In particular, the linked tutorial contains an XCode projects that should get you started. Check out DragController.m to see where you put the code you referenced with your link.
Apple has released a samplecode explaining how to do it. http://developer.apple.com/library/mac/#samplecode/DragNDropOutlineView/Introduction/Intro.html
I found this much better then all the other samples i've found on the internet.
They're delegate/data source methods, so you put them into the outline view's delegate and data source. Usually this is your controller object, but it's up to you to hook up the connections in IB or programatically. I'd actually suggest learning how data source and delegate methods work before using bindings or Core Data, since bindings isn't meant to replace knowledge of lower level code (and you're going to run into a lot of problems with bindings until you have a solid understanding of the basics).
Also, keep in mind NSTreeController has improved a bit since 10.5, from what I've heard you should be able to get the real observed object without using private methods anymore.