iphone

How to compare a string within a another string?

How to compare a string within a another string? Example: NSString *temp = @"english, french, japanese, chinese"; NSString *jap = @"japanese"; How do i compare the string "japanese" in temp with the string "japanese" in jap. Is there any function? Thanks in advance ...

How do I reliably pull a text file of unknown encoding into an NSString on an iPhone?

Here is some code which I use to pull a text file into a UITextView called textView. Because I can't always know the file's encoding ahead of time, I use the method -stringWithContentsOfFile:usedEncoding:error:, which stores an encoding value by reference. Once I have the encoding, I then open up the file and, if there's an error, prin...

curl simulation for facebook publishing

To publish photos on the Facebook need to perform: curl -F 'access_token=...' \ -F '[email protected]' \ -F 'message=Caption for the photo' \ https://graph.facebook.com/me/photos example from developers.facebook.com/docs/reference/api/photo How to create the same POST request in the iPhone app? ...

Distributed Object on the iPhone?

Is there a way to use distributed objects on the iPhone? I think you need the NSConnection object which is absent in iPhone's version of Foundation. I know that it is not in a public framework but I don't mind. Please don't go on about that "rejected from the AppStore" stuff, I know that pretty well. ...

Restarting iPhone application after [UIApplication sharedApplication] openURL

Hi, As title says I'd like to know how to restart my iPhone app after doing this: [[UIApplication sharedApplication] openURL:[NSURL UrlWithString:@"tel://0123456789"]] It seems pretty simple as I saw many topics also talking about restoring the very state of the application when openURL is called, but I can't find how to simply restar...

How to create Footer view in the table view Using View Controller in iPhone

Hi Friends, I want to create a footer view in my table view.I have created view controller and add a subview as table view. So how can i add the footer view in that table view?. Note: I have used only view controller, not table view controller. I haven't used table view controller in my apps, bcoz i have used many controllers as subvi...

Widget application in iPhone?

I like to develop a widget kind of application for iPhone. Will app store accept the application? It going to be a free app ...

Please help memory warning 1 then 2

Hey guys just a quick question: I have an app, it has multiple view controllers, who have 2 views each. one for portrait and one landscape. The delegate has all the actions in it. These are called from the view controllers The_Ride_Vol_1AppDelegate *mainDelegate = (The_Ride_Vol_1AppDelegate *)[[UIApplication sharedApplication] delegat...

How to get the iPhones GSM signal level?

For an application I'm developing I need to get the GSM signal level, but I haven't been able to find how to do it using public APIs. I thought that it couldn't be done, but I have found an app on the itunes store that does it (here). Can someone help me with this? Thanks. ...

Xcode Memory problem, unloading and loading views from delegate

Hey guys just a quick question: Overview: I have a basic magazine app, it has multiple view controllers, who have 2 views each. one landscape and one portrait view for visual reasons. The app delegate has all the actions in it. These are called from the view controllers using : The_Ride_Vol_1AppDelegate *mainDelegate = (The_Ride_Vol_...

DrawRect method slowing over time. Why?

I posted this elsewhere bus was unable to get help. So basically I'm trying to make it so the user can "draw" an Image onto a view. The way I'm trying to accomplish this is by every 9ish pixel of movement on the screen, I create a mask of the line drawn and then clip the image with that mask. It actually works beautifully at first, and...

SystemSound doesn't play on device (iPhone)

Hello, I'm currently developing an application for iPhone and I would like to play a sound when the user touch a button. When I use a .mp3 audio file, the sound plays on the simulator but won't on the device. When I use a .tif audio file, it plays on both of them, but the quality isn't really good. So my question is, is it possible th...

Posting tweets using API secrets for own app eg "via <myApp>"

Hey Guys I originally used this tutorial - http://icodeblog.com/2009/07/09/integrating-twitter-into-your-applications/ to put twitter into my app. It works great, however, the tweets say 'via API' - I don't want this. I'd like it to say 'via myApp' - (I have registered my app with Twitter and have the secrets etc. If you've done this...

free() call works on simulator, makes iPad angry. iPad smash.

Hello, My app is running out of memory. To resolve this, I free up two very large arrays used in a function that writes a framebuffer to an image. The method looks like this: -(UIImage *) glToUIImage { NSInteger myDataLength = 768 * 1024 * 4; // allocate array and read pixels into it. GLubyte *buffer = (GLubyte *) malloc(my...

An example of pushing and retrieving of an NSObject's pointer in ObjC from Shared Memory?

I know that there are better ways of sharing objects such as distributed objects but my situation is quite difficult. I'm working on two iPhone apps which are running parallely and need to share an object. That object happens to be a CALayer and it needs to be accessible by both applications. Second application adds its own CALayer to th...

How to change the color for particular character in UITextView of iphone using xcode?

How to change the color for particular character in UITextView? ...

Compress Document folder in application sandbox of iphone

Hi I need to compress the Documents folder in the application sandbox and upload the compressed file to a server. I've been able to send files from iphone to the server, but am stuck in regards to compressing the folder. I'm using the ASIHTTPRequest libraries for connecting to the server. Any body can point me to the right direction. I...

iPhone: How to Place a Scrollview Inside of Tableview Cell

I want to put a scroll view inside of the table view cell. I have a number of buttons in one cell of table view and I need to scroll that cell to show the appropriate button. ...

Differences between iPhone OS v2 and v4?

Hi Can any one say difference between the iPhone OS 2+ till 4 and what's the main difference in the OS as well as the development in xcode.. Thanks ...

Maintaining product for Android + iPhone

This is a question to all of you out there who develop for both Android and iPhone. How do you maintain support for the two platforms? Specifically, do you maintain the two products totally separate from each other? create "native" GUIs in Java/ObjC and a "core" library in C/C++? write both versions in the same language (e.g. Java) an...