cocoa-touch

Iphone View Crul left right

Hi All IPhone SDK has UIViewAnimationTransitionCurlUp/Down I want Curl left-right like a reading a book. Is any way to do this without Landscape Orientation. Thanks Amit Battan ...

Tranparent animated image in webview

Hi All I am using animated image (gif image) in webview but problem is that it showing while background for transparent image. even I set the background color of webview is transparent. Is any way to do it transparent or any other way to show transparent animated image in Iphone SDk Thanks Amit Battan ...

How do I make a UIAlertView happen only on the first start-up of an iPhone app?

I'm using the UIAlertView to make a pop-up happen once the app has started up. It works fine but I only want the pop up to happen on the first start-up of the app. At the moment I've got the UIAlertView in the AppDelegate class, after the application didFinishLaunching. Here is my code at the moment. - (BOOL)application:(UIApplication *...

Conflit between AVAudioRecorder and AVAudioPlayer

Hi, here is my problem : The code (FooController) : NSString *path = [[NSBundle mainBundle] pathForResource:@"mySound" ofType:@"m4v"]; soundEffect = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; [soundEffect play]; // MicBlow micBlow = [[MicBlowController alloc]init]; And MicB...

Adjusting table cells for navigation prompt

I have a tableview with a navigation bar at the top. I've added text to the prompt property of the navigation bar. This cuts the top half of the first tableview cell. Is there a way to tell the tableview that the prompt is present or do I need to roll something custom? ...

Can I avoid explicitly casting objects with a common subclass?

I have an iPodLibraryGroup object and Artist and Album both inherit from it. When it comes to my view controllers though I find that I'm duplicating lots of code, for example I have an ArtistListViewController and and AlbumListViewController even though they're both doing basically the same thing. The reason I've ended up duplicating t...

NSString's stringByAppendingPathComponent: removes a '/' in http://

I've been modifying some code to work between Mac OS X and iPhone OS. I came across some code that was using NSURL's URLByAppendingPathComponent: (added in 10.6), which as some may know, isn't available in the iPhone SDK. My solution to make this code work between OS's is to use NSString *urlString = [myURL absoluteString]; urlString ...

How to save iphone screen shot as jpeg image?

Hi I am working on an app where I need to save a part of iphone's screen shot as JPEG and then send this through email. The part of screen has some text labels, fields etc. Any ideas please on how can I save part of screen as JPEG (I am a newbie therefore any help/sample code is highly appreciated) ...

iPhone OS: How do I create an NSDate for a specific date?

Seems like a simple thing but I can't seem to find a way to do it. It would be great to see a couple different methods. Thanks, Nick ...

Changing color of alert views

How can I change the color of the alert view box from blue to black? Any one please help!! ...

UIAlertView crashing on undocumented method

Our app has been crashing with a frequency of roughly 1 in 1,500 launches due to a bug that is proving elusive. The relevant portion of the stack trace is included. It's being fired as a callback so I have no reference for where it's occurring in my own code. It looks like what's going on is there is a UIViewAnimationState object that...

Can I separate an NSString by more than 1 separator?

I would like to separate my string by spaces, commas, periods (ie. punctuations). I am using: [myString componentsSeparatedByString:@" "]; to separate by spaces, but need to be able to split by punctuations as well. ...

UITableView hide sectionindex but retain sections

We'd like to implement our own section index UI for UITableView. It's clearly possible, since the contacts app does it on iPad. Is there a way of legally hiding the current section index? (I can get to the undocumented _index UIView but that's not going to cut it with Apple I suspect) ...

How to replace a character in NSString without inserting a space?

Let's assume I have the string NSString* myString = @"Hello,"; How can I remove the comma without leaving a space? I have tried: NSString* newString = [myString stringByReplacingOccurrencesOfString:@"," withString:@""]; and NSString* newString = [myString stringByTrimmingCharactersInSet:[NSCharacterSet punctuationCharacterSet]]; ...

Get content length from UIWebView

I am looking to find out if a web page has changed, I was going to use the content length of the web page but have not seen a way to do so. Any ideas? Or can anyone think of another way to check periodically if a web page has changed? Any ideas are appreciated. Thanks, Chris ...

UIRemoteNotificationType invalid conversion

Hi, I'm trying to use this fairly standard line of code in my app: [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; But am receiving the follow error: error: invalid conversion from 'int' to 'UIRemoteNotificationTyp...

create an UTF-8 string with BOM

Hi guys, I'm using MD5 function and Base64 Encoding to generate a User Secret (used to login to data layer of the used API) I did the code in javascript and it's fine, but in Objective C I'm strugling with the BOM my code is: NSString *str = [[NSString alloc] initWithFormat:@"%@%@%@%d", [auth up...

How can I store a float value in an NSArray ?

for ( tempI = 0; tempI < 10; tempI++ ) { tempJ = 1; NSArray *objectsForArray = [NSArray arrayWithObjects:@"array[tempI][tempJ]", @"array[tempI][tempJ+1]", @"array[tempI][tempJ+2]", nil]; } Can I write the code as above. I need to store an float value (array[][]) in NSArray. Can I do it ? My problem is, I have a matrix as ...

Detect long tap in UIScrollView

How would I detect a long tap (tap and hold) within a UIScrollView? ...

Infinite loop when adding CATiledLayer to UIView

I have a UIView in which I add a CATiledLayer and implement 'drawLayer'. If I use a UIViewController and add the layer to a new subview of the controller, then everything is ok. If I however try to use a UIView to and do all the craetion and drawing within this, then I get a infinite loop at the point shown below when I add this view to...