objective-c

iphone sdk syntax

Hi All, This is probably a really basic syntax question, but I can't find the answer. Can anyone tell me what this expression means? objPoint.x = -objPoint.x; As a note, objPoint is a CGPoint Thanks! ...

Importing Complex XML into Core Data via NSXMLParser?

Hi all- I've been working on importing XML into an iPad Core Data application. I have a working NSXMLParser implementation for my files, and have been able to import the simpler (ie attribute-only) elements into Core Data. Some of the XML dated has nested elements with text, and I'm a bit stumped on how to get Core Data to play nicely ...

Objective C version of explode()?

If I want to explode a string by parts in PHP into an array, I have the nifty explode() function where I just do the following $mystring = "HI:THERE:HOW"; $stringarray = explode(":", $mystring); And I get $stringarray = ( [0] = "HI" [1] = "THERE" [2] = "HOW" ); Is there a similar function in Objective C that explodes a string...

iPhone SDK Audio Mixer

What I need to do is be able to mix 4 channels of audio (not from a live source, just prerecorded audio files in the app bundle), and change their volumes individually, in real time, preferably with MP3s. What's the best/correct road for me to take, regarding all the various sound APIs for the iPhone? Thanks! ...

Objective-C implementation of Shape Context algorithm (Image Matching)?

There is a very cool sounding technique called Shape Context matching, which can be used in an Image Recognition application to match an "unknown image" against a known "image library." There are numerous descriptions of the concept documented on the web (mostly all variations of the same original paper), for example: http://www.eecs...

objective-c : iphone programming error with localization

hi, i had a gps into my application that worked well for a time and now he is not working anymore and this is why it says in the console : /SourceCache/ProtocolBuffer/ProtocolBuffer-38/Runtime/PBRequester.m:660 server returned error: 503 ...

In Objective-C, when should I use class methods and when should I use instance methods?

What is the difference between class and instance methods in Objective-C and when should I use each of them? ...

UITableView Not Scrolling With UISearchBar

What I want to achieve is a UISearchBar that moves up and covers the UINavBar, and contains a cancel button on the right of it. All goes well, until I use the following line of code: searchDC = [[[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self] autorelease]; What ends up happening is the UITableVi...

How to I navigate back to a previously loaded xib file?

in my app I have three views. Originally the appDelegate opened the xib file for the mainViewController, and the preset settings on my application template included a flipsideViewController, which would be shown when an information button was hit. Later I decided to include another view controller and xib file, called CountySelectionVie...

Mutable array is automatically changed to immutable, while adding the object to it. why?

Hi Guys, These are setter and getters. -(NSMutableArray*)contactList { return contactList; } -(void)setContactList:(NSMutableArray*) aContactList { [contactList release]; contactList=aContactList; //its working fine but leaks // contactList=[aContactList copy]; // If I keep like this getting exception as mutatin...

Enhance appearance of UINavigationBar

I would like to know how to enrich the appearance of controls such as UINavigationBar, UITabBar, UIToolBar, back-buttons to make them look more 'physical'. I made some tricks with custom views sliding in and out with a nice image in it but what I want is to customize those standards controls so they look like in those amazing apps Apple ...

casting comparison between Objective-C and C++

Okay, so this might be a bit of an academic question. Can someone tell me if/how C++'s casting operators might translate to Objective-C... or how/why they're not necessary? I've been out of the loop with C++ for a few years now and it seems like every time I turn around they add a few new keywords. I was recently introduced to C++'s v...

Xcode iPhone: Removing text from a .txt file

Hi, I have a text file with some strings in it, I am able to access the text from the file by using [NSString initWithContentsOfFile] function but what I want to do next is remove the whole text from that file but leaving the text file there as my application will continue to feed strings of message into the file. I've looked through NSS...

How to enable exception handling in objective-c and xcode

Hello, EDIT: Issue has been solved(partially):It is a simulator bug. I've compiled and tested this on two devices with iOS 3.1.3 and 4.0. The exception was handled correctly. Be careful, the simulator is your enemy! this is driving me crazy. I don't know how to enable exception handling in my project. Look at the code and debugger outp...

Can you open apps within other apps, with no URL scheme?

Is it possible to open another app, like Camera, from a third-party app? I know there are URL schemes - http://wiki.akosma.com/IPhone_URL_Schemes - but I just want to open an app, not send any data to the app. ...

Objective c : link two points with the touch by drawing

Hi, I have two points. The user can be able to join a point from the other. With the touch moved action, a straigth is created incrementaly and during the dragging on the screen. I have created a method to retrieve the equation of the straigth and then the point of intersection with the finger and this straigth. After, I redraw a new s...

How to NSLog with \n\r\t

Hello ! Every one. In my application I am reading an HTML page to a string. HTML Page contains many tags, new lines & many other characters. <style type="text/css"> h3{ font-weight:bold; line-height:18px; font-family:Arial; font-size:12px; text-align:justify; color:black; ...

How to access sqlite database from server in my app

Hi all, I am new in iphone application development. My problem is that my sqlite database is uploaded on the server.I have the link and port number of the database.How i access the database from the server. if possible then provide any sample code. Please help me. Thanks, Arun ...

how to access sqlite database from server

hi all, in my application i uploaded sqlite database on the server. problem is that i have no knowledge how to access the database from the server in my application. Please tell me anyone how i access database from the server. ...

Most elegant way to access UINavigationController from pushed controllers

Say I have NavigationController->Root[Table View Controller subclass] So from didSelectRowAtIndexPath of my Table View Controller subclass I have to push another view controller to NavigationController. What is the most elegant way to access NavigationController? Should I use have delegate of NavigationController in my Table View Contro...