objective-c

Can audio files be saved like photos and movies in iphone using objective C?

hello all, If our iphone application uses the inbuilt camera to click any picture, for saving the image into iPhone's photo library, we use UIImageWriteToSavedPhotosAlbum method. Likewise, to store any video recording into the iPhone, we use UISaveVideoAtPathToSavedPhotosAlbum Is there any method to save any audio file into iPhone's So...

iPhone User Defaults starting values

I've set up my app's user defaults to contain two toggle switches - one for help, one for sound. They are working however the starting values are false even though I've set them to be YES: I use BOOL variables to track these values in the app, so I'd like to store YES/NO values. What else do I need to do to get the correct starting va...

How to get started with Cocoa application development?

I'm a Java guy who is familiar with Swing programming and recently just started out with iPhone programming. Boy the learning curve was steep and now I would like to start Cocoa development for desktop apps. I've been reading on articles and considering buying few cocoa book to advance my learning, still I feel I don't fully get it yet....

reload uitableview simultaniously

i have to reload uitableview simultaniously using a thread. i'm already using two threads for loading data from web. Is it possible using a thread for reloading tableview? Is there any other way? ...

How do I create a new image by drawing on top of an existing one using Quartz?

i have a view with uiimageview i assign this uiimageview image by camera..now i want to do some drawing onto image....using coregraphics.i want to do something like this... select an area by touching and drawing line when line joins something like circle or any shape..i want to change that particular area in to something else for example...

iPhone playing video in custom view: Example Code Please?

I'm wanting to put together an application which plays video fullscreen with an interface overlaying it that basically chooses the video that is played underneath it (think 'Gym Babes' but nowhere near as risqé!). I don't wish to use private headers so MPMoviePlayerController is out of the question. I've been digging through stackoverfl...

query about accessing the ringtone sync functionality of iphone

hello StackOverflowers, i came across this post where Reader Comment #16 mentions: "The ringtone syncing functionality is ALREADY inside the iPhone, it just needs to be accessed" I understand that you can transfer your music files,ringtones, videos all by syncing your iphone with iTunes. But what does the above mentioned statement i...

Simulating the back button on the UINavigationController on the iPhone

I currently have a TableView inside a NavigationController where when a item is selected the following code is ran: DetailViewController *DetailViewController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:DetailViewController animated:YES]; [De...

obtaining objective c nsstring from c char[]

code below. i'm tryind to obtain string answers like "a1", "c4" this is what i'm having instead of "a1": "adresse finale: \340}00\214" with this prinf: printf("\nadresse finale: %s",[self convertCGPointToSquareAdress:self.frame.origin]); the method is: -(NSString *) convertCGPointToSquareAdress:(CGPoint ) point{ int x= point.x /...

Fetch object by property in Core Data

In my iPhone project, I want to write a function that checks wether there's an object in my Core Data ManagedObjectContext with a given value for a certain property, say some_property. If there's already an object with some_property == 12, I want the function to return the object, otherwise, I want to create the object, or at least retu...

NSArray becomes NSCFArray when passed

I have a method that receives many different kinds of objects and decides what to do with them: -(void)performAction:(NSObject *)myAction withItem:(Item *)myItem { actionCount = -1; NSLog(@"-- NEW ACTION ARRAY --"); if ([myAction isMemberOfClass:[Look class]]) { currentActionArray = [self createLookArray:(Look *)myAction item:myItem];...

Xcode: When is a View Controller added to the stack of views?

Is a view controller added to the stack of view controllers at the #import line of the root view controller? Is this where indexPath gets the info about the view controllers? I've read documentation and seen tutorials, but this aspect still isn't clear to me. I'm been learning Xcode/Obj-C for 4 months now. Thanks, Steve ...

Better way to check an area touched rather than just a rectangle

Just wondering if there was another way to check a touched area using a polygon of a particular shape rather than just using CGRectMake. Here's the same code for this example: CGPoint location = [[Director sharedDirector] convertCoordinate: [touch locationInView: [touch view]]]; CGRect mySurface = CGRectMake(x, y, temp.contentSize.widt...

Relationship between CFMutableDictionary and NSMutableDictionary

The following statement is taken from the CFMutableDictionary Reference section of the Mac OS X Reference Library: CFMutableDictionary is “toll-free bridged” with its Cocoa Foundation counterpart, NSMutableDictionary. What this means is that the Core Foundation type is interchangeable in function or method calls with the bridged Foun...

Collections of collections and Objective-C memory management

I have a pretty simple question. While I am fairly new to Objective-C, I have gotten pretty comfortable with the language and the memory management model. I understand ownership pretty well and the notion of explicit and implicit. I also understand that when you add anything to a collection, it takes ownership of the keys and values a...

Objective C confusion - Setting sythesized vars to ivars

I've noticed in some of the examples ive seen that you will set a engine( class variable ) to a _engine ( ivar ). I don't get it. What's going on here? Here is an example of what I'm saying: @synthesize engine = _engine, delegate = _delegate ...

Outputting iVars from description method?

I am pretty sure I am just missing the point here and getting confused. Can anyone tell me how I might write a simple description for an object that will print out the value of its instance variables to the console. Also: is there anyway to present the information as a block (i.e. if you had 10 iVars its going to be a pain getting them ...

Is there a framework or cocoa API for playing video?

In short, I want to create a simple video player which can play some major video formats like quicktime *.mov, for example. What I need is: video playback (at least the most major formats would be great) play, pause need information about where the movie currently is (how many seconds passed, or how much percent) I'm targeting the ma...

how to implement Multidimention array

Hi, I want to use a multidimensional array. Can any one explain how to use that in an iPhone app? I'm new to Objective-C. Here's what I'm trying to do: I am spliting the main string on the basis of seprator and storing in an array. replacing some content of this array's each elements with new substrings and new values are storing ...

Finding invisible folders with spotlight by constructing an NSPredicate with NSMetadataQuery

I am constructing an NSmetaDataQuery to find invisible folders (Like ".myInvisibleFolder"). Unfortunately, spotlight does not seem to be locating folders beginning with ".", even when specifically included in the predicate. What works and doesn't work Searching for any non-invisable filename works. Searching content works (kMDItemTex...