objective-c

How to dismiss a modal view as soon as it's displayed (without user interaction)

Hello everybody, I apologize if my question may result trivial or obscure. I am using a view presented modally. In order to achieve a little 'scenographic' animation effect, based on the value of a parameter, I wish to reach the following behavior: If value is 0, the view presented modally stays on display and allows user actions until ...

How should I implement bi-directional networking between an iPhone application and an Objective-C server-side application?

I'm looking for advice on the best way to implement some kind of bi-directional communication between a "server-side" application, written in Objective-C and running on a mac, and a client application running on an iPhone. To cut a long story short, I'm adapting an existing library for use in a client-server environment. The library...

Linking Error in Xcode

Hi All, I am getting this error after adding the libxml2.2.dylib file Linking /Users/Biranchi/Desktop/Funmovies TabBarController/build/Debug-iphonesimulator/funmovies.app/funmovies (1 error) in /Developer/Platforms/iphoneOS.platform/Developer/SDKs/iphoneOS3.0.sdk/lib/libobjc.A.dylib, missing required architecture i386 in file Comman...

Displaying a localised version of iPhone Contact Picker (ABPeoplePickerNavigationController)

In my app I use the ABPeoplePickerNavigationController to present an address book to the user so they can select a contact from their contacts. I want my app to support multiple localizations (English, French) and I was expecting the ABPeoplePickerNavigationController to display the correct localised strings when I changed the phone's l...

NSOutlineView and several models

Guys, can somebody point me to sample open source application or tutorial or brief description, how create table view where items grouped by(I think its NSOutlineView, right?). For example, I have products grouped by categories and looking for table which look like this: | Product name | Product cost | -Category1 | product1 name | $10...

Symmetric Difference of Two Arrays

I have two NSArrays of Movie objects called DVD and VHS. I'd like to find the symmetric difference of these arrays. I want to know which Movies are in VHS buy not in DVD, and which Movies are in DVD but not VHS. Can anyone tell me if there is a fast algorithm to solve it (preferably in C or Objective-C)? Is it faster/easier to solve if...

Xcode runtime error: ".objc_class_name_CContext", referenced from:

hi, I'm getting this error in Xcode while developing an app for iPhone , what is this error related to, ... what should i do to clear this error? Here CContext and CManager are interface which implement there own protocols.And TestManagerAppDelegate is the interface where i'm creating the object for CContext and CManager and i want to ca...

How do I play music using MPMusicPlayerController?

Hi Guys, Can any one suggest me how to play the music using MPMusicPlayerController in my application. Anyone's help will be very much appreciated. Thank you, Monish. ...

Design philosophy for iPhoto and Aperture export plugins

I need to design a plugin architecture similar iPhoto and Aperture's export plugins, but I'm puzzling over the design pattern that Apple used. I hoping somebody could help shed some light on the advantages to the approach taken by Apple. The pattern that Apple uses for both programs is to have an ExportManager of sorts that the plugin q...

Objective-C - How To Remove Characters From a String?

I have a UILable that has a formatted String (formatted for currency), so there is a dollar sign, $21.34. In the core data entity the attribute is of a type double, I am using an NSDecimalNumber to save to the database. self.purchase.name = self.nameTextField.text; NSString *string = self.amountLabel.text NSDecimalNumber *...

Overriding properties of child view controller vs setting them via parent view controller

If you want to modify the default behaviour of a View Controller by changing the value of one of its properties, is it considered better form to instantiate the class and set its property directly, or subclass it and override the property? With the former it would become the parent View Controller's responsibility to configure its ch...

Methods from @synthesize?

When you synthesize a property (see below) @interface CelestialBody : NSObject { NSString *name; } ... @interface Planet : NSObject { NSString *name; int mass; CelestialBody *moon; } @property(nonatomic, retain) NSString *name; @property(assign) int *mass; @property(nonatomic, retain) CelestialBody *moon; ... @implemen...

Objective-C for IPhone for Java Developers: Books, Sites, Videos?

[Yes I have seen this question but I do not know C nor C++, otherwise the O'Reilly book would be great. Though some of the answers to the question are helpful] I do not know C nor C++. I know C#, but only the "managed" stuff. I know Java, but have never dealt with JNI. (I also speak Ruby, PHP, and Basic variants, but that seems to be be...

UIButton Buy Now effect

Hi. I want to make a "Buy Now" button in my Application, which should work the same way as the one in the App Store, but I dont know how to resize the UIButton with an animation. I have tried the following, but it resized the button at once and not as an animation: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration...

Method causing a weird crash

I am building this app and i am encountering some issues I havent seen before. the app crashes when I run the method below which is connected to a uibutton for a trigger. so when I hit the button it does the print and then the simulator crashes to the springboard. if I launch the app again from the springboard it doesn't get to the pri...

iPhone Original Notepad Tutorial?

Hello all im trying to find a simple notepad tutorial or advanced. like the one used in the iphone app bundle any help is appreciated. ...

UITableViewCell displaying incorrect alpha based background colors

I have a UITableViewCell with the UITableViewStyleGrouped style and I would like to change the background color of the cell. - (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)ip { // Do cell creation stuff ... cell.backgroundColor = [UIColor colorWithRed:255.0/255.0 green:243.0/255.0 b...

sample mac Firefox Plugins?

I'm trying to re-write an old image-viewing plugin for the mac. The old version uses QuickDraw (I said it was old) and resources (really really old) and so it doesn't work in Firefox 3.6 (which is why I'm re-writing it) I know some Objective C, and so I figure I'm going co re-write this in that using new-fangled Mac routines and nibs, e...

New to ObjC, coming from AppleScript Studio and not understanding certain things.

Hi, Yes I've seen questions like these before but they're all for people who basically want to start from scratch. I come from AppleScript Studio (for those who do not know it, it's AppleScript in Xcode with IB etc.). The only things new to me are related to interface and implementation files. In my code I've already written 2000+ lines...

OSX hide window effect on the iPhone

Hi everyone, Is it possible to 'easily' make on the iphone a MAC OSX hide window effect on a UIView? When I say easily, I mean using existing libraries or tools... Thanks ...