I want to use CFNetwork and Bonjour in conjunction to be able to have communications between my iPhone app and a Mac app. The app on the iPhone would have one button. Then on the Mac app, there will be a label. If the button is pushed on the iPhone app, the label changes on the Mac app.
Is there example code out there that can do this?...
Hey all,
I have this bizarre problem. I'm making a checklist program with XCode and I'm using UITableView with UITableViewCellAccessoryCheckmark. I can select cells and the checkmark will appear, but somehow, other cells that I have NOT yet selected below will also have a checkmark appear. Any ideas?
Here's my check mark coding:
- (voi...
I'm getting errors like this:
2010-07-13 20:43:15.131
Python[1527:60f] main: Caught
OC_PythonException: :
LoginMenuSet instance has no attribute
'play_sound'
That's with this code:
@try {
[section loop]; //Loop through section
} @catch (NSException *exception) {
NSLog(@"Caught %@: %@", [exception name], [exception ...
Possible Duplicate:
NSString is integer?
I've been searching around for the last half hour trying to find an easy way to convert an instance of NSString into an integer, and to be able to tell if the string was validly formatted. So far, I haven't been able to find anything. There's the intValue and integerValue methods in N...
Hi,
I am creating my second iPhone app, and I've included a feedback form using MFMailComposeViewController. This displays and works correctly, but I'm not sure I want all my users to see my email address. Is there any way to set the to: field to my email address, and then hide it so that the user doesn't see it?
Many thanks, Javawag
...
I have a UITableView that needs to be updated after a notification is posted. I do this by calling reloadData on the TableView. Before I upgraded to OS 4 the tableView would maintain its vertical scroll position. After upgrading to 4.0 it scrolls to the top after reloadData is called. Thoughts?
...
Hi,
I am making an application that represents a cell phone bill using Core Data. I have three entities: Bill, Line, and Calls. Bills can have many lines, and lines can have many calls. All of this is set up with relationships. Right now, I have a table view that displays all of the bills. When you double click on a bill, a sheet comes ...
I have a Cocoa/Objective-C program, I set it up the way it wants, with a menu bar, etc, and the quit menu item comes pre-linked to FirstResponders Terminate method. Fine. But what happens in that method?
More importantly, how do I get things to happen on quit? I have an AppController object that is the delegate of the mainmenu, and is ...
This is a general question about memory management and best practices when using Cocoa arrays.
Which of the following is "better":
NSArray *pageControllers = [[NSArray alloc] initWithObjects:
[[Page1 alloc] initWithNibName:@"Page1" bundle:nil],
[[Page2 alloc] initWithNibName:@"Page2" bundle:nil],
[[Page3 alloc] initWithNibN...
I am new to objective C and I have a c++ background. I want to display a value in the label on the screen. I am calling the label value from the MainView.m. However, the label becomes blank after I click a button instead of printing a value. What is the problem? Here is the code.
MainView.h
@interface MainView : UIView {
int a;
}
-(...
I'm just wondering...
I've downloaded this App called "Telnet Lite" for the iPhone where you can connect to your devices through Telnet. You just give up the IP address, server port, username & password. Works great.
Now I'm wondering how this can be done (in code) on the iPhone. Can someone post a sample code where you establish a con...
Playing around with MapKit and I'm wondering ...
Is it possible to determine where on the screen (the x and y) the blue dot representing your location sits as you move the map around?
I recognize it starts out in the center of the screen ... but if you start to move the map it sticks with it.
Thanks -wg
...
Is there an iPhone equivalent for the NSResponder methods -selectNextKeyView or -nextValidKeyView from Mac OS X? I know about the -becomeFirstResponder method, but finding out which view to call that on is not very pretty when view hierarchies get more complicated.
There must be some kind of way to find this out as when I press tab when...
I have been given an error on the Mac:
objc[30344]: FREED(id): message release sent to freed object=0x3d55b60
How do I determine the object's symbolic identity so that I can fix the problem ?
...
I have three textfields in interface builder being used to accept input. When a button is pushed the data in the 3 fields are processed. Currently, when one of the textfields sends out a textFieldShouldReturn (or similar) message to its delegate, I assign the "sender" parameter (using the tag property) to the delegate's respective UIText...
I current have everything setup to read from the documents directory and write to it , but Cannot do it because the file doesnt exist yet.
How is a file created within the code?
...
Hi Everyone,
I'm a newb to iphone development and objective c, but hoping some folks smarter than me can lend a hand. Here's my problem:
I have a view based app with about 7 different view controllers. The user navigates via a bottom tab bar. I have the users entering data in the first view controller to an object named "copies". I...
Hello,
I am trying to send a POST request to my Ruby on Rails local server. Unfortunately, at first it wouldn't let me POST because of protect_from_forgery, so I ended up setting it to false in development and production. Basically, my issue is that I'll send the POST request from my Cocoa app with all of the wanted params, and the Ruby...
My iPhone app (http://hexalex.com) is not universal but it has a feature that I'd like to enable for people playing on iPads. Is there some way to detect that you're running on an iPad in compatibility mode? The UIDevice methods for detecting machine specs all return the values you would get on an iPhone (on the simulator at least). T...
How can I parse this into an objective-c NSDate most efficiently?
"2010-07-13T11:22:33-07:00"
This is what I tried
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"yyyy-MMM-dd'T'HH:mm:ssZ"];
but did not work
...