objective-c

Core Animation window flip effect

Any tutorials or sample code to get the Core Animation window flip effect? I'm using Flipr right now, which uses Core Image to generate the effect but CoreAnimation is much smoother Thanks ...

Is there a way to use NSPredicate to issue an NSDeleteRequest vs. an NSFetchRequest in Core Data?

I don't think the class NSDeleteRequest exists, but I want it to. I can make an NSPredicate and use NSFetchRequest to issue: select * from foo where x=y How can I issue: delete from foo where x=y ? The only way to delete 1000's of rows seems to be to fetch them, loop thru them, and call delete on each NSManagedObject. Is that righ...

Send mail without MFMailComposeViewController

I want to send mail from an iPhone app without showing an MFMailComposeViewController. I also want this mail to be sent from the user's default Mail account. Is it possible to do this? ...

Nil NSDate when trying to get date from UTC string in zulu time

Writing an iPhone app in Objective-C, I have a date in string form (in UTC format, with a Z on the end to denote zero UTC offset, or zulu time), which I need to parse into an NSDate object. A bit of code: NSDateFormatter* df = [[NSDateFormatter alloc]init]; [df setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZ"]; NSString* str = @"2009-08-11T06...

Releasing CGImage (CGImageRef)

I'm curious if I'm following proper memory management with CGImageRef, which I'm passing through several methods (since it's CG object, I assume it doesn't support autorelease). Memory management with non-NSObjects and interaction with other NSObjects is still somewhat new to me. Here what I'm doing: I'm creating the CGImageRef inside ...

using variable for imageNamed instead of hard-coded string

How do i use a variable as an image name instead of hard coding the string? right now I'm using this [UIImage imageNamed:@"one.jpg"] I would like to pass a NSString variable instead of "one.png" ...

program simple tone generator that plays two tones one in each of the two stereo

i wish to generate two opposing tone one in the right stereo channel and one in the left stereo channel both at different frequencies i wish to accomplish this in c or objective c ...

Draw a shadow behind UIWebView

I know similar questions have been asked before, so don't get snarky and link to previous answers. The reason I am repeating this is that none of the answers have worked. I have a UIWebView, and I want to draw a pretty drop-shadow behind it. I have tried subclassing and using some CoreGraphics goodness in drawRect:, but to no avail. Can...

iPhone subview design (UIView vs UIViewController)

I'm designing a simple Quiz application. The application needs to display different types of QuizQuestions. Each type of QuizQuestion has a distinct behavior and UI. The user interface will be something like this: I would like to be able to design each type of QuizQuestion in Interface Builder. For example, a MultipleChoiceQuizQuesti...

UIScrollView as image viewer

I have to use UIScrollView as image viewer like Photo app. The UIScrollView is supposed to show photos with swiping, zooming and rotating with interface rotation.i have to load minimum 20 images.is it possible? which is the best way? plz post some sample codes. ...

UIViewController manual instantiation within application delegate

I'm just starting iPhone development (coming fron a .Net world) and have been going through many "Hello World" applications to get the hang of this new development platform. One area I have been confused with is the instantiation of a view controller. On an Apple "Hello World" tutorial, they start by creating a Window Based App, which by...

Can an object be a delegate for multiple delegators?

I'm not sure about my terminology here, but: I have a ViewController in an iPhone app that needs to be a delegate for two other objects (delegators). Is this possible? This does not work: @interface my_projectViewController : UIViewController <DelegatorOne> <DelegatorTwo> { ... } ...

How to add a checkbox in a alert panel?

I want to add a checkbox in a alert panel . But now I found that the func: setShowsSuppressionButton not be used under MAX 10.5. My system version is 10.4.11 ! Which other methods I can do ? I didn't want to make a panel by my self . Thank you very much! ...

What's the difference between using CGFloat and float?

I tend to use CGFloat all over the place, but I wonder if I get a senseless "performance hit" with this. CGFloat seems to be something "heavier" than float, right? At which points should I use CGFloat, and what makes really the difference? ...

Starting editing for a Row as soon as it is Added.

I have an NSOutlineView and what I want to happen is that when a row is added I want the row that has been added to Start Editing immediately like when you double click on a row. ...

iPhone error:cannot find protocol declaration for MPMusicPlayerController

Hi i have the following error in my code error:cannot find protocol declaration for MPMusicPlayerController and am completely stumped as to what it means. Any insight into this is greatly appreciated. ...

Asynchronous methods in RubyCocoa

I understand that it isn't possible/sensible to use threads in RubyCocoa. However it is possible to use asynchronous Cocoa methods to avoid blocking user interface events. I've successfully used a method on NSURLConnection to send an HTTP request and receive the response without blocking the user interface. But I'm wondering what other ...

Infinite loop when running code in terminal from xcode

Hello everyone I'm writing a small app to keep track of local mono sites. I'm mostly writing this for my own use and to play around with xcode To start the server i run the following code: [task setLaunchPath: @"/usr/bin/xsp2"]; NSArray *arguments = [NSArray arrayWithObjects: @"--root", [[document selectedSite] valueForKey:@"path"], ...

fast enumeration for array containing different types of objects

If I have an NSMutableArray where I added objects of different classes (e.g. NSString, NSMutableString, NSProcessInfo, NSURL, NSMutableDictionary etc.) Now I want to fast enumerate this array, so I tried: for (id *element in mutableArray){ NSLog (@"Class Name: %@", [element class]); //do something else } I am getting a warning i...

Converting JSON date(ticks) to NSDate

Does anyone know how to convert a JSON date(ticks) to an NSDate in Objective-C? Can someone post some code? ...