Totally new to Objective-C and Core Data, coming from a .net background I really want to put all of my fetch requests into some sort of class that I can call, preferably statically to get my objects, something like:
ObjectType *myObject = [CoreDataDAL GetObject:ID];
Anyone have a pattern to implement this?
I am hacking my way through ...
Because the default cropping frame of an UIImagePickerController (when using the setting setAllowsEditing:YES) isn't the right size for me I've created a custom view controller, like suggested here.
When a thumbnail is selected from the UIImagePickerController I open this custom view controller (navigationController) from - (void)imageP...
I'm trying to understand Objective-C properties and I have some lingering questions about their syntax.
What is the difference between explicitly declaring an ivar for a property like this:
@interface myObject1 : NSObject {
NSString *title;
}
@property (copy) NSString *title;
@end
and this:
@interface myObject2 : NSObject {
}
@pro...
I'm trying to make a bitmap editor app for the iphone which would be similar to Brushes or Layers or a cut-down version of Photoshop. I'd like to be able to support 1000x1000 resolution images with about 4 layers if possible.
I'm trying to design my undo/redo system before I write too much code and I'm having real issues coming up with ...
What is the correct filepath to store a plist on the device.
I read this in a tutorial
which will work for the computer, would like to know the file location for the device.
// write xml representation of dictionary to a file
[dictionary writeToFile:@"/Users/henrik/Sites/foo.plist" atomically:NO];
I currently try to write to the f...
Does NSURLConnection automatically send messages to the class that initialized it or how does it work because I did not reference it in my header file.
...
I have a problem with some simple code. The photo's, either picked or taken with the camera, are rotated. At first I thought it was a setting in the UIView but it happens when I copy the passed in UIImage to another UIImage using CGImageRef. I did it this way as it was the easiest way to ensure I was using a copy. Correct this code i...
How can i make a new CFAttributedStringRef with increased font-size based on a CFAttributedStringRef i got?
In my specific project i would like to dynamically increase the size.
If i call CFAttributedStringSetAttribute(...) on the whole string using CTFontRef the string will lose it's formatting and the new will replace all the others ...
I'm using UISearchResultsController to filter data from a fetchedResultsController. Here is the relevant code:
In RootVieweController.h:
@interface RootViewController : UITableViewController <NSFetchedResultsControllerDelegate, AdditionViewControllerDelegate, UISearchBarDelegate, UISearchDisplayDelegate> {
NSArray *filteredListCo...
I've included a static library into my project (by using Xcode project references) and I've got a question about building with it.
The included Xcode project has 2 build configurations, debug and release, whereas my project has 3, debug, release and distribution.
When building with debug, my project is built with it's debug config, and...
Solved
Hey all,
I'm currently working on a Split-View Based Application for iPad. I want the Root View Controller to navigate to another TableView, and from there, the users can select the appropriate row and display the information in the DetailViewController. I managed to code the navigation part in (The Root View Controller navigate...
Hey,
My iPhone development is stepping up a notch and I'm looking at the UI. We're thinking of having a few nice interface-y features - things like dragging and dropping images onto one another from a gallery list, or similar.
How far does the basic iPhone interface stretch? Do most people create their own interfaces and code, and if s...
Hey there everyone!
I'm creating an app that needs to run on 10.4 and above. Having a date string that is formatted properly is crucial. When I run my program in 10.5 debug everything is good; I get a date which is exactly how I want it:
Jul 13, 2010 16
the 16 being the hour without the minutes, which I specifically need. Then when ...
Writing some Objective-C in one method, I call +alloc, then -init to set up an object.
object = [[MyClass alloc] init];
[object useFor:whatever];
The next few lines of code use the newly created object. If the aforementioned -init takes too long, I’m sure the program won’t “wait” before starting to use the new object, will it? If not...
This code
MPMoviePlayerViewController* mp = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
int i=0;
unsigned int mc = 0;
Method * mlist = class_copyMethodList(object_getClass([mp moviePlayer]), &mc);
NSLog(@"%d methods", mc);
for(i=0;i<mc;i++)
NSLog(@"Method no #%d: %s", i, sel_getName(method...
Is this possible?
I want to be able to press a button on the iPhone app and something happens to the Mac app. Maybe via 3G and wifi.
Any ideas?
...
Hi,
I have an iPad application that builds and runs perfectly the first time. But if I exit the application and open it again, the interface is completely unresponsive. If I exit and open another time, it never gets past the splash screen.
What's strange is that if I wait a minute or two before opening it again, it always runs fine.
A...
I have a string
"AA - The Title of the Person"
How can I get the part before the '-'?
The output should be "AA"
Also if the input doesn't have a '-' then output should be nil
...
I have a table view with a search bar at the top of the page. When I scroll through the table and then press in the search bar, while the table is still scrolling I get a
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (37) beyond bounds (0)'
I'm a little lost on what the i...
How can I parse this into an objective-c object most efficiently?
"2010-07-13T11:22:33-07:00"
This is what I tried
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"yyyy-MMM-ddTHH:mm:ssZ"];
...