iphone

When to set kAudioUnitProperty_StreamFormat ?

When to set kAudioUnitProperty_StreamFormat (and kAudioUnitProperty_SampleRate too)? For each AU in my AUGraph ? Or is it enough to set it jus for the AU Mixer ? André ...

How to call method automatically when switching views in TabBar app with a single ViewController

My application uses UITabBarController with 4 tabs. Each tab will have a UIWebView along with other types of objects. When the app launches I need to call the method for this first webView to retrieve my web content. I have this method in my viewdidLoad: [self performSelectorInBackground:@selector(getAdvisory) withObject:nil]; The w...

Retrieving Google Reader subscription list in iOS app

I need to retrieve Google Reader subscription list for a user in a iPhone app. I understand that there is no official API available, and I have kinda exhausted Google search already. Out of various options, the closest I have found is [http://stackoverflow.com/questions/3836445/using-json-framework-on-iphone-help/4029277#4029277], can an...

Is there a better way write this objective-c code?

Hi, this code creates a random transition when I change scenes. There are eleven transitions. Because they are static, I think I cannot use NSClassFromString. I also need to pass the scene (s) object. Right now the switch seems redundant. Is there a way to rewrite this to make it more efficient? -(void) newScene { CCScene *s = [CCScene ...

Toolchain question: How do you add a header/lib so the compiler knows where to find it?

I have made a toolchain using this script: http://gist.github.com/403608 (more or less modified to get it to work) Everything is installed and now when I try to compile using it I get an error when I ./configure it says that my C compiler cannot create exeicutables. I'm thinking that my compiler just doesn't know where to look for all ...

[iPhone] UITableView reloadData many times cause memory leak and slow down application

I made a mistake when using Leaks instrument that I thought total living objects is byte of memory, so I updated my post! [Updated] Hello All, I am facing with a problem that: My application present realtime data by using UITableView which may contains maximum 34 customized cells, so when receiving update data, I have to do reloadDat...

TV out window in iPad simulator disappears on landscape mode

I'm making an app for the iPad with TV output to an extra screen. Everything works fine, but for some reason the TV out window disappears when I put the iPad in landscape mode. I commented all the code that makes it go to landscape automatically but as soon as I rotate in iPhone simulator, the tv output window goes away. Is it just not ...

UIBarButtonItem normal and pressed states switched?

I created a toolbar with a translucent black style like so: UIToolbar *toolbar = [UIToolbar new]; toolbar.barStyle = UIBarStyleBlack; toolbar.translucent = YES; I created a button item for it: UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithImage:nil style:UIBarButtonItemStyleBordered ...

Can we Integrate flash in iPhone application?

I want to integrate flash in my iPhone application so is it possible to integrate? ...

How to send an Array of NSString use NSURLRequest?

I have an Array of 5 NSString. I want to send my array to my web use NSURLRequest as URL query data? Anybody can help me :) ...

IPhone app and Web Services

Hi guys, I'm evaluating the possibility of outsource an iPhone app I have in mind. The app will basically allow different users to share the same information across their phones. I'm thinking in having a unique DB in a web server and store all the info there to help the syncing. I can program the web service and all the CRUD myself sin...

dismiss modal view with return key

Hi, I got one UITextField on my Modal view controller. When "Done" key is clicked, i want to dismiss the modal view. i don't know where should i add below code to dismiss modal view. Thanks in advance for any help. [self.parentViewController dismissModalViewControllerAnimated:YES]; ...

Launching iTunes Store within iPhone app using PhoneGap

When I use itms://.itunes.apple.com/us/album/speak-now/id399727924 it works fine in xcode. But, I'm trying to use this in phonegap and external linking is not working.. is there a way to launch itunes within app.. ex: _webapp? thanks, jad ...

Strange sluggish sound recording from AudioUnit

Download from here. It sounds very sluggish. what's wrong? http://www.megaupload.com/?d=XGQS3CA4 AudioStreamBasicDescription audioFormat; audioFormat.mSampleRate = 22050.0; audioFormat.mFormatID = kAudioFormatLinearPCM; audioFormat.mFramesPerPacket = 1; audioFormat.mChannelsPerFrame = 1; audioFormat.mBytesPerFrame = 2; audioFormat.mBy...

iOS Core Data - design pattern

Hi, I'm a little stumped with an issue that I think goes back to my design. I'm constructing a TableViewController based on a mainly static set of rows (4) - using that as a basis for a UITableView. Each row will kick off varying different views (detail, and UITableViews)... In my managed object context for the top view I can easily n...

What exactly is @implementation NSArray (Find) and the Warning it gives?

A couple of questions regarding the following code: @implementation NSArray (Find) - (NSArray *)findAllWhereKeyPath:(NSString *)keyPath equals:(id)value { NSMutableArray *matches = [NSMutableArray array]; for (id object in self) { id objectValue = [object valueForKeyPath:keyPath]; if ([objectValue isEqual:value] || objec...

Sqlite Opening Error : Unable to open database

Hi, In my app, I use a calendar control to store the information date-wise. Calendar Control's Link : http://blog.webscale.co.in/?p=244 Problem : For example, the current selected month is October 2010. Now if I switch back to April 2010 and try to comeback to Ocober 2010 & access data from calendar that I stored in the month of Oct...

MKMapView: message sent to deallocated MKMapViewDelegate

This is a mysterious bug for me. I suspect the issue is burried somewhere in IB or my code, but so far I haven't been able to find anything suspicious. Hopefully one of you more experienced developers have run across a similar issue and can point me in the right direction. I have a view set up in IB, and I have a subclassed MKMapView ad...

how to modify title and badge icon in UITabBarController

I have the following code: tabBarViewController = [[TabBarViewController alloc] init]; mvc = [[MapViewController alloc] init]; tvc = [[TableViewController alloc] init]; tabBarViewController.viewControllers = [NSArray arrayWithObjects: tvc, mvc, nil]; However, when opening up in the simulator, I don't see any title or badge for these t...

UITextField inside UITableView cell

Hello, I have been reading through a lot of things trying to figure out what I am doing wrong. I have been trying to add 4 UITextFields inside of UITableView cells. I have the UITextFields created through IB, as well as the UITableView. I add the textfields to a NSMutableArray and then in the cellForRowAtIndexPath I am adding these tex...