EDIT: see below for a fix, but I don't understand why the fix works. :)
Code:
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"A"
inManagedObjectContext:moc];
[fetchRequest setEntity:entity];
NSSortDescriptor *sor...
Okay, so I have an app that I'm trying to get to populate a UITableView with the contents of a plist file. I haven't been able to find anyone else having problems doing this and how they fixed it so I'm probably just an idiot but I need to know how all the same!
I'm sure the error is somewhere in my viewDidLoad section or my tableview s...
I am currently working on a BrainFuck interpreter for the iPhone. Seeing as BrainFuck only has eight commands, I want to create a custom nine-button (eight commands + backspace) keypad that will be showed instead of the standard iPhone keyboard. Is there any easy way of doing this?
Thanks,
amit ron-
...
When I've learned that I have to write some code to make the iphone keyboard go away. I was quite surprised. I was surprised even more when it become apperent that it is just the top of the iceberg.
What are the expected UI behaviors that aren't provided by system OOTB?
Is the list below complete?
The expected UI behaviors:
Focusi...
i have a UIImageView displayed in my view with an image "image1" already set.
I have a button below it.
During runtime i would like the image to change to "image 2" when the button is pressed and upon release i would like the image to display "image1" again
1) I know that i have to give the UIImage a label or something so that i can a...
The UIImageView is placed in interface builder.
I already created an IBOutlet.
How do i programmatically change the UIImageView to view another image.
Can someone please help me?
...
I've seen at least one application that uses a grouped UITableView with a cell containing paragraphs of text, and the cell is taller or shorter based on the length of the text, but I don't quite get how this is done.
How does one, given a variable width font, figure out how high a UITextField or something needs to be in order to display...
Hi,
In winforms/C# most all UI Controls have a .Tag tag, so like myButton.Tag = myObject; where the Tag property is an 'object' type so you can basically store any type of object. How might I accomplish this in Objective-C/Cocoa? do all UI elements have something like .Tag where I can store an NSObject or something? If so, can you pleas...
I'm having a problem. I get incoming time strings in 12-hour format, and I'm turning them into NSDate objects. When the iPhone is in 12 hour format, no problem. But when it's in 24 Hour format, things go wrong. Here's some sample code to demonstrate:
NSString *theTime = @"3:19 PM";
NSDateFormatter *formatter = [[NSDateFormatter alloc] i...
I'm developing an application in which I need to display a message showing where to turn after user clicks a position on route highlighted with the help of directions on Google map.
There's this Groute class which provides much of the information like distance, duration between two places, but it doesn't give information about direction...
For some reason I cannot access the view as a property
MyAppDelegate *APPDELEGATE=((MexicanWaveAppDelegate*)[[UIApplication sharedApplication] delegate]);
[APPDELEGATE.viewController view];
APPDELEGATE.viewController.view; //Accessing unknown 'view' component of a property
I have been able to access view as a property for other view c...
I have a Core Data database with latitude and longitude properties. Is there a way to use Core Location's getDistanceFrom: method to find the five nearest locations to a CLLocation obtained from the GPS? Do I have to load all the objects using Core Data and parse through them, using getDistanceFrom: on each one or is there an easier way?...
Currently, I'm developing an application, in which I have to show an infoWindow on click event on map itself.
My question is I want to show a button as well as a combobox on this infoWindow.
How can I do this?
...
I have a UIButton that selects itself on UIControlEventTouchUpInside. It deselects itself on UIControlEventTouchUpOutside. I also want it to deselect itself when there is a touch down outside of the button. Is there a good way to do this without subclassing UIWindow and overriding -hitTest:withEvent:?
EDIT: I just found this question...
When I check a singleton property that is nil, it kills my app. But when I check for nil on a class instance property, everything works fine.
This works fine:
self.MyProperty == nil
but this will kill the app with “EXC_BAD_ACCESS”
[MySingleton sharedManager].SomeProperty != nil
What is the difference with the singleton that I can...
I am developing an app for the iPhone where I need to convert an date from an XML feed into just a HH:MM format.
I have the following method that doesn't work and I have no clue what I am doing wrong.
As an example, the timeToConvert string would be: "Mon, 01 Feb 2010 21:55:00 +0100" (without the quotes)
The method works when the regi...
I am using fbConnect in my Cocoa Touch application. I have UIWebview on my view, and I want to publish the UIWebview's context (its only text) to FaceBook.
How should I change the FBStream to publish my UIWebview?
FBStreamDialog* dialog2 = [[[FBStreamDialog alloc] init] autorelease];
dialog2.delegate = self;
d...
UIImage *image = [[UIImage alloc] initWithContentsOfFile:@"popup.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[self.view addSubview:imageView];
[image release];
[imageView release];
The code sits within a UIViewcontroller object. It compiles fine but, when run, the subview does not appear to be a...
I am developing an iPhone app that polls an internet web service. The poll rate will decay from once every 20 seconds to once every 15 minutes if the iPhone is sitting idle in a dock running my application. If the user taps the screen or begins moving around the UI I need to revive the polling rate back up to 20 seconds.
Is there a univ...
Hi guys...
It seems my questions are strange and i'm not getting enough help but I'm back.
I've another strange question which needs to be solved in emergency.
I'm developing an iPhone app. which uses libssh 2 for commands execution through iPhone over remote host. It's okay and working all methods and commands if i execute them in sin...