objective-c

Facing problems in fetching the data from php web services installed in cake-php from iphone.

Hi everybody! I'm new to php and have zero exprience with the cake-php. I created the php web services, which reads data from MySql and return to my iphone app. Previously I used the same code successfully in many app, But now I'm facing the problems in it. Because the web server on which I installed my web services is cake-php based. wh...

Objective-c formatting style causes an error in a switch-case

I'm getting an error in my switch statement with some multi-line Objective-c code: - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { // Notifies users about errors associated with the interface switc...

Symbol not found: _OBJC_CLASS_$_Article

I am working on an extension to Vienna to add the ability for third parties to write Objective-C plugins, but I am getting some runtime linker issues only when running in 64-bit mode (everything appears to work fine in 32-bit mode). My plugin, SynkPlugin, is loaded by the following code in Vienna.app: NSArray * bundlePaths = [NSBundle p...

how to load image in background in UITableCell in iphone application

Hi I have develop an RSS application. in My table cell I am displaying images which i retrive from imge link in RSS feed and Title. Images are loaded successfully but the problem is that it hang my application. as there any way to load image in background. my current code is. int blogEntryIndex1 = [indexPath indexAtPosition: [indexPat...

Objective C Memory Management Woes

I know this has been discussed ad-nauseum but I just don't get some of the memory management. I understand that retain keeps the object alive and copy gives one a separate copy of an object. What I don't get is when it comes to ivars & properties, retain as a property means that the setter releases the old value & retains the new: prop...

calling [myString release] does NOT decrement [myString retainCount]...

I have the following situation, which seems to cause my iPad application to leak memory. I have a class with a string property... @property(nonatomic,retain) NSString * synopsis; I set the string property from some HTTP response, either from JSON or XML response. At that point the retain count of the synopsis object is 1. But I have...

IOS4 UIButton Selected State Question (Error: Lvalue required as left operand of assignment)

In simple terms I have a view with three buttons; buttonOne buttonTwo checkButtonStatus if buttonOne is clicked it sets its own selected status to yes and buttonTwo selected status to no. Clicking buttonTwo does the opposite. Both buttonOne and buttonTwo by default are not selected. The third button (checkButtonStatus) should perfor...

Exception in iPhone app : Modal transition is already in progress

I have what I believe is a fairly simple application at the moment based on a few tutorials cobbled together. I'm using XCode 3.2.3 in OSX 10.6.4. It started as a standard iPhone "Window Based Application". Using interface builder I have added a Tab Bar Controller using the O'Reilly video tutorial here: http://broadcast.oreilly.com/2...

Use CGFloat instead of float? They don't do it

[I might be misunderstanding this entire topic, as I've grown up with languages that allow the dev to almost entirely ignore processor architecture, like Java, except in some particular cases. Please correct me if I have some of the concepts wrong.] Reading here it seems that the advice is to use CGFloat instead of, say, float, because ...

on view load, start a timer and reveal images at times in iPad app

So in my XIB I have a few graphics that need to reveal in order.. say every one second, the next thing will reveal.. I assume I am going to need something involving viewdidload, starting an NSTimer, then animate the revealing of my graphics with the timer. Can anyone please drop me a few ideas, hints or lines of code to get started? Tha...

Adding NSArray to NSDictionary is causing problems

Hi, I'm writing an app in XCode 3.2.3 for iOS 4. In my code, I am creating an NSArray of NSDictionaries, each containing two key/value pairs, a string and an NSArray of NSDictionaries (kind of confusing, I know). Just to give you a visual, here is the structure: <NSArray> <NSDictionary> <NSString/> <NSArray> ...

Need help tracking down USB error

Currently I have an objective-C program that detects when a Fujitsu scanner is added and removed from the computer. I'm trying to add the ability to ask the scanner information about itself. I know the command for this, however, something is going wrong. I'm doing a bit of cargo-cult programming, from two different cargo cults (How do yo...

Instruments says I have a memory leak, but I don't see it

I have a method to generate a Deck object (NSObject subclass with an NSMutableArray property) and it populates the array with Card objects (UIView subclass with some integer and one NSString property). When I ask for a Deck I check to see if one already exists (I think) and if so, release it before getting a new one. The code from my v...

stringByTrimmingCharactersInSet: message not working

Hi, It is exasperating but I can't get this code work, first I though it was a mutable/inmutable problem but it doesn't, I believe. What am I doing wrong? labeledPemString do has contents and the specified characterSet is printing 'ranges begin {0, 26}' . But unlabeledBeginPemString has the same as the original string. //Get the .pe...

iPad keyboard appears in wrong orientation

I have a splitView Application that has a rootViewController and DetailsViewController When the application loads the detailsViewController pops a Modal viewController that contains a UINavigationBar. The UINavigationBar has a search bar on it (set programatically). When focus is brought to the search bar the keyboard pops-up. However...

Objective-C: How to use xAuth?

Hi, I'm relatively new to Objective-C and am completely new to xAuth. Can somebody show me how or lead me to a tutorial to get a request access token pair and make a request to a URL given username, password, consumer_key, and consumer_secret? I'm really foggy with this, and I don't even know why I get a access token pair (why two toke...

AdvancedTableViewCells code example problem

So apple has this pretty cool example about how to make a uitableview which cells resemble appStore cells. Code can be found here. Now, the strange thing... I was playing with it, and in RootViewController.m where it was - (void)viewDidLoad { [super viewDidLoad]; // Configure the table view. self.tableView.rowHeight = 73.0...

NSArray vs array

is this OK practice? NSArray* myarray[3] = {nil,nil,nil} ... myarray[0] = some NSArray or is it better to stick with NSArray over all? NSArray* myarray = [NSArray...] ? ... [myarray addObject:..] ...

Objective C on Windows or Linux

I would like to learn objective-c, but don't have a Mac. How would I compile obj-c on Windows or Linux? I would prefer Windows, but Linux would be OK. ...

Sending a Message from a iPhone to a Mac.

How would I send a message to an App on my mac (which I develop) from my iPhone via WiFi? This message would then make something happen in the Mac App. This is just a fun app for myself so it doesn't need any security like SSL. ...