cocoa-touch

How can I call a method written in class1 to class2 ?

I have class1.m . I declared a method and written in it. Now i need to call it into another class. How can I make it? Can we use extern for it like we use for variables. Thank you. ...

NSCurrentLocaleDidChangeNotification on iPhone OS

While the NSCurrentLocaleDidChangeNotification perfectly makes sense on Mac OS X, I don't see how you can possibly receive it on iPhone OS. In order to change the locale, you have to quit the running application, then change it in Settings → General → International → Region Format. At that point, your app is not running, so how could it ...

Tab bar controller in landscape mode

Hi to all All my app is in landscape mode .In some point I switch to a screen with Tab Bar Controller , but it's been placed like in portrait mode.I subclassed the UITabBarController and override the method "shouldAutorotateToInterfaceOrientation" to return YES always but because the app is already in landscape , this method is not being...

cocoa - referencing a method on the parent

I had a method on my main view controller named "calculateThis". This method was run, obviously, as int newValue = [self calculateThis:myVariable]; when I run it from inside the view controller. Then I created a static class and I need to run this method from there. How do I reference this method from that class using just relative...

Using images and css file for a generated HTML UIWebView

Hi! I'm generating an HTML file for an app, and in this HTML file there's a link to a stylesheet and one to an image. Here's what I tried so far: NSMutableString *toReturn = [NSMutableString stringWithCapacity:100]; NSString *cssPath = [[NSBundle mainBundle] pathForResource:@"etapes.css" ofType:nil]; [toReturn appendFormat:@"<html><h...

iPhone payment portal development

A client has asked me about building an iphone app that can take restaurant orders. I have the resources to get this app done, but I had a few questions. *Will this app require a portion of the sale to go to apple (if so how much?) *Whats the best way to integrate a payment portal to this? *Will I have to/should I have someone author...

pushViewController using UINavigationItem instead of UINavigationController

Hello, I have implemented a method didSelectRowAtIndexPath that should push another view. I have a code running properly using a navigationController but in this case I am using a navigationItem on a view. How could I trigger a view? Thanx Error log: 2010-03-25 00:09:52.459 TableArchive[1062:207] trigger 2010-03-25 00:09:52.461 TableAr...

iPhone UIButton - image position

Hello! I have a UIButton with text "Explore the app" and image (>) In Interface Builder it looks like: [ (>) Explore the app ] But I need to place this image AFTER the text: [ Explore the app (>) ] How can I move the image to the right? ...

UIView method called after drawRect

Is there a UIView method that is called called after drawRect is completed? ...

Tilde in device name causing problems with NSOutputStream socket

In the networking between the iPhone and desktop versions of our application, the iPhone sends over the device name for use on the desktop. The problem is that some of the beta testers have tildes (`) in their device names. For some reason when this is in the device name it prevent the socket from sending the actual string data. I've tr...

UIViewControllers tripping over each other...

Need some best practice advice here... Navigation based application. Root view is a UITableView where user can drill down to a detail UIViewController (call it VC1). User wants to initiate some task but it may require additional info before it can proceed. If so then VC1 allocs & presents modal VC2 using the "flip" transition holding a ...

How to change font size in a pickerview?

I'm fairly new to iPhone programming and am trying to implement a double-component PickerView. At this point the picker works fine in terms of taking user input, created with Interface Builder. However, I need to change the font size to accommodate the text length in each column. I very much would appreciate any link to a straightforward...

Update iPhone UIProgressView during NSURLConnection download.

I am using this code: NSURLConnection *oConnection=[[NSURLConnection alloc] initWithRequest:oRequest delegate:self]; to download a file, and I want to update a progress bar on a subview that I load. For that, I use this code: - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [oReceivedData appendDat...

Core Data - NSPredicate to filter to-many relationship

I have 2 entities, Task and List. Each task has a to-one relationship to a List object called "list", and there is an inverse relationship with List, which has a to-many relationship with Task called "tasks". I'm trying to use a fetch request with an NSPredicate to get all the Task objects that belong to a specified List: NSPredicate ...

How do I keep music playing after the user presses the hold button on the iPhone?

Hey guys how can I make an app keep playing an mp3 after pressed the hold/power button. Here is the code I use for preparing the AVAudioPlayer: - (void)PrepareAudio:(int)index { NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@",[_Audio objectAtIndex:Game]] ofType:@"mp3"]; NSURL *...

how do i view all photo from iPhone Built-in photo library progammatically

how do i view all photo from iPhone Built-in photo library progammatically? just like ppt, review all photo automatically. ...

Problem getting IM information from an ABRecord

Hello, I'm trying to get the IM account information from existing contacts (adressbook) on iPhone. I walk through the contacts and I get the contacts which have an entry in IM but I can't read the jabber-address. abArray = (NSArray *)ABAddressBookCopyArrayOfAllPeople(ABAddressBookCreate()); for(int i=0 ; i<[abArray count];i++) { ABRe...

"incomplete universal character name" with stringWithUTF8String

hi, when i try to convert form utf-8 string to NSString like so: NSString *s = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0631\U0646"]; NSLog(@"%@", s); i get the compile error: incomplete universal character name note that it sometime just works fine: NSString *UAE = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0...

How to generate Objective C class files from XML schema?

I have an XML schema that defines my data model. I would now like to have Objective C source files generated from the XML schema. Does anyone know how to accomplish this? ...

How do you do a page curl animation without using the iPhone's built-in curlUp and curlDown animations?

I would like to animate a page flipping, like is shown here, but without using the built-in UIViewAnimationTransitionCurlUp and UIViewAnimationTransitionCurlDown animations. Is that possible? ...