cocoa-touch

Can canceling a NSURLConnection lead to problems?

Before my view loads I call: [theConnection cancel]; //assume theConnection is an NSURLConnection I then proceed and make my proper NSURLConnection. Will calling cancel before a connection is even made cause any problems? ...

Core data save triggered a non relevant exception about UICalloutBarOverlay????

2010-08-05 00:34:49.186 Holidays[30485:207] -[UICalloutBarOverlay controllerWillChangeContent:]: unrecognized selector sent to instance 0x5b53540 2010-08-05 00:34:49.188 Holidays[30485:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICalloutBarOverlay controllerWillChangeContent:]: unrecognize...

Application Loader error - CFBundleResourceSpecification missing and icon.png getting renamed??

Hi all, I am running into a problem with a client uploading their app to the app store. We are having two issues: The application loader gives the following error: 'Info.plist does not contain a CFBundleResourceSpecification'. When they build the application for distribution, the plist reverts to having icon.png instead of Icon.png ...

Is it possible to animate the width of a UIButton of UIButtonStyleCustom type?

I have an animation on frame size which works fine when the UIButton is a UIButtonTypeRoundedRect. But has no visible affect when I am using a UIButtonStyleCustom with background image. My animation code is here: [UIView beginAnimations:@"MyAnimation" context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAni...

i am getting warning: incompatible Objective-C types assigning 'struct NSString *', expected 'struct NSMutableString *'

i am getting warning: incompatible Objective-C types assigning 'struct NSString *', expected 'struct NSMutableString *' on this line:- Value = [Value stringByAppendingString:str]; I declared Value as NSMutableString* Value; How to rectify this? ...

Outputting sound using multiple audio routes at the same time in an iPhone App?

Hello, I'm playing around with audio routes in AVAudioSession at the moment and I'm wondering whether it is possible to output sound to multiple audio routes at the same time i.e. a sound playing from the speaker and a different sound playing in the headphones? Ideally I'd like to be able to play separate sounds via a dock connector (us...

How to shuffle button or title over button?

I have 'n' button. I want to shuffle those button in my application. Or you can say that i want to shuffle the title over buttons. Is it possible.Its an Iphone app. ...

NSCFString or UIViewController !?

Hello, I am using UIViewController (a subclass of course) with a text field which sends an action when the contents changed (to the contentsChanged: selector of the ViewController). It is done by sending contentsChanged: to file's owner in IB. But when I test it, it says : "-[NSCFString contentsChanged:] : unrecognised selector sent to i...

Cocoa Touch - Upsidedown Buttons and Text

I'm making a 2 player game where you play on either side of the iPhone and I need to have upside down buttons. Any ideas on flipping them around? ...

nested view controllers, where to add subview and how to manage memory

I have one root viewcontroller loaded by app delegate and a second one (no nib file) that should be loaded as root controller's child (i want to display its view contained in root controller's view). Where and how should i do this? Is viewDidLoad method suitable for such initialization? - (void)viewDidLoad { MyViewController* pdfCont...

Memory issues with cocoa touch

First let me start off by saying I do not believe I am leaking, but I could be wrong. My issue is that at after my app is done loading I have about 10 - 20 mb of Live bytes according to object alloc, which I am fine with. However, according to activity monitor my process allocation is about 70 - 80 mb, which needless to say is a bit high...

UISearchBar:textDidChange: return value when empty?

Hi, does anyone know how to test when the last character in a UISearchBar is deleted. i.e. you type ... Gary > return "Gary" Gar > return "Gar" Ga > return "Ga" G > return "G" > return ??? . -(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { [self FG_Filter:searchText]; } I was thinking ...

UINavigationBar unresponsive after canceling a UITableView search in nav controller in tab bar in a popover

Ok, this is an odd one and I can reproduce it with a new project easily. Here is the setup: I have a UISplitViewController. In the left side I have a UITabBarController. In this tab bar controller I have two UINavigationControllers. In the navigation controllers I have UITableViewControllers. These table views have search bars on them. ...

How do I set up an NSPredicate that filters for items in a specified group using NSFetchedResultsController

I have a Group entity which has many Item entities. An Item entity can be in multiple groups. The relevant portion of my model looks like this: The Problem When I call [fetchedResultsController performFetch:&error] I get this error in the console *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ...

Cocoa Touch - Timing button presses

I'm making a reaction type game and I needed some help implementing a way to define who touched it first. So I can compare and know who is the winner and award points correctly. I have no idea how im gonna implement this... Any Ideas? ...

Root cause of UIScrollView scrolling performance problem when it contains subviews with shadows

I have a UIScrollView with subview with shadow enabled as follows: UIView *contentView = ...; contentView.layer.shadowOffset = ...; contentView.layer.shadowRadius = ...; I noticed that scrolling performance degrades (scrolling becomes really choppy) if I increase the size of the subview or add many small subviews with shadow enabled. ...

Cocoa Touch - Looping Help

I need help with some programming logic... I need to loop this method to display the math problem in my labels then sleep(5) and then loop again. Anything I've tried ends of freezing the program. PLEASE help! I've been tearing my hair out trying everything I know! EDIT: I edited the code to this, After 3 seconds it fades away the label ...

How do you use AVAudioPlayer to play music while in the background?

I currently use AVAudioPlayer to play music while in the foreground, but when I press the home button my application goes to the background and the music stops. I set the category for my AVAudioSession to AVAudioSessionCategoryPlayback and set active to YES. Additionally, I added the audio key to UIBackgroundModes in my Info.plist. Is...

Iphone SDK -- troubles with custom UITableViewCell Nib

I create my own nib, and class for it. I hooked up all the controls to the class in interface builder. When I run it it runs fine. The only problem is that when I scrole the tableview it crashes. Any ideas what the error could be? I've been trying to fix this for a while to no avail. It gives an EXC_BAD_ACCESS which I'm not sure how to d...

Scrolling a UITableView inside a UIScrollView

I have a UITableView which is a subview of a UIView, then that UIView is a subview of a UIScrollView. How do I detect the touches that should scroll the UITableView? The UITableView can get item selection events (a cell in the table is selected/tapped) just fine, except that you have to hold down on the cell before it fires. But I can't...