objective-c

Animating OutlineView

I would like to add a sort of animation to my outlineView when a row is added, I use it as a friends list and I want to create something like the iChat one, Or a way to make them fade in ...

Click a Tab Menu item to launch TTPostController, TTEmailController or a delegate

How to set the 5th Tab menu item (Tab Bar) to execute a method using its delegate like the following: [map from:@"tt://joinGame" toObject:self selector:@selector(launchGame)]; or to go to the post controller directly if the Tab item is clicked [map from:@"tt://suggest" toViewController:[TTPostController class]]; I tried the followi...

Can I store a custom object inside a button in Objective-C?

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...

Question about ivars and @property's on the iPhone

I have a question about how instance variables work and when to use the @property. Here is an example interface file I am working with @interface PackageModel : NSObject { NSString *tracking; NSString *carrier; NSString *status; NSMutableDictionary *events; // Connection ivars NSMutableData *receivedData; ...

Why use function pointers in a struct in Objective-C?

Hey folks, I just read this http://stackoverflow.com/questions/2172887/use-c-struct-in-objective-c question, and I was wondering why anyone would want to use function pointers in structs. Wouldn't wrapping the functions in a class be equivalent? ...

Empty character in Objective-C

I'm creating some code that will find a space between characters, and use the characters before the space and the ones after it. These characters are stored in a NSString. Here is what I have so far, however, it's not seeing the empty character. NSString *tempTitle = self.title; unsigned int indexOfSpace; // Holds the index of the c...

problem in TextFields.

Hi Guys, I am trying to save the text in the textfield when we are entering the text itself. for that I used the code as: here eventTextField,eventPlaceTextField,wineryTitleLabel,vintageTextField are the textfields. - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSStri...

In app purchase error

hi i am developing in app purchase application and when we build our application when click on buy button nothing is take place but in console show Buyid method called. I am not understand that help me ...

Devicetoken of iphone for push notification?

Hi everybody, I have tried PushMeBaby as server. The problem which I am facing is that the Push notification gets activated as when the app launches it prompts me to connect to itunes for push notification, but neither the didRegisterForRemoteNotificationsWithDeviceToken nor didFailToRegisterForRemoteNotificationsWithError get cal...

Property only accessible via message passing (Objective-c)

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...

Is it possible to get Proxy setitings's Useranme and password from Mac system settings?

Hi, I want my application to read the proxy settings information from the mac os settings, i want to read the proxy server url and proxy username and password too... Im able to read the proxy server url using scdyanmiccopyproxy() function, but Is it possible to read the proxy username and password? ...

Exception thrown after install xcode 3.2

Hi, everyone. I found this problem after I install the latest SDK and Xcode version 3.2 Beta from Apple. Before install, my iPhone project compile correctly and has no any exception. But after I finished setup the latest SDK, I open my iPhone project to do some update. I compiled the project like I did before, no error report. But aft...

problem in adding image to the UIButton.

Hi friends, I got an another problem in my application and I am wasting so much of time on that. Does pls anyone can help with this problem. Actually I had an Event and I should give rating for that event for that I wrote the code as: In CellForRowAtIndexPath......I had the code as: - (UITableViewCell *)tableView:(UITableView *)tv cell...

objective c dynamic object creation

Hey Guys Quick question for you. I want to be able to create an instance of an object. The object type is based of a string. In php you can just replace the class name with a string, but I doubt it is that easy in Objective c. NSString * className; id theObject; className = @"TestObject"; theObject = [[className alloc] init]; here...

define a long complex literal string

Hi, I have a string that is quite long and complicated, with special characters inside. I want to define this string as a variable, but don't want to escape each of them (because there are so many). I remember that in XML they have a special syntax for that, is there something similar for Objective-C? Edit: I know I can save the thing ...

Add method selector into a dictionary

Hi all, I want to add a selector into a dictionary (the main purpose is for identifying the callback method and delegate after finish doing something) But I find that I can not do that, the program will get an error "EXC_BAD_ACCESS". Are there any other way for me to add that method selector to a dictionary? Thanks for your help. ...

Database + Sync (Iphone app)

Hi, How can I flush my sqlite database in my application when I click on a button? I already have a database inside my app, when I click on a button it add some data into it. I wanna know how to fluch the database after I click the button or maybe restart the application automatically. Thanks, ...

performace problem when I build the application in Device.

Hi guys, Here in my Application I go performance problem when I build the application in Device. actually in my database i am having the table wine details in shich there are 2114 winenames are there . to get the all those wine names I wrote the code in appDelegate as: -(NSMutableArray*)getWineDetails { [wineDetailsList removeAll...

Retrieve UserLocation Coordinate with MapKit

Hi, I"m using MapKit in my application and disaply the user location with [mapview setShowUserLocation:YES]; I want to set the region.center.latitude and region.center.longitude with the coordinate of the userLocation, how to do it? ...

Core Data and Core Location

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?...