cocoa-touch

Tableview cells does not display data when in integer format.

My application has a sqlite database and i m using executeQuery methods to retrive and insert data. Problem I cannot assign integer values cells of tableview. It does not display data which is in integer format. i want to store integer values into a tableview and show sorted integer data to user. Here i am posting my code 1) in vi...

Sort on to-many relationship using a NSFetchedResultsController

I'm trying to use the NSFetchedResultsController in my app, but have a problem to sort my data. I get the following error when trying to sort the result using a relationship that is two levels down from the entity: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'to-many key not allowed here' M...

Exiting or interrupted?

Is there a way to differentiate when a user is exiting an app because he/she pressed the home button or because it's receiving a phone call? in iOS 4.0 the app doesn't quit if the user answers a call but it does in 3.x. I'd like to save my app state if the user is interrupted by a call or any other phone event but not if the user exits...

What is the size of GameCenter achievement images?

So I want to incorporate GameCenter achievements in my game, but I have to supply images for each achievement for display in the GameCenter app. Apple isn't really clear about the required size. I've read online that they demand 512px images, but then they scale them down to something like 32px which makes it all blurry and/or pixelated....

Facebook Chat using XMPPFramework on iPhone

Does someone already created an iPhone app that connect to the Facebook chat server using their X-FACEBOOK-PLATFORM authentication mechanism and XMPPFramework ? I have no idea how to start, any code sample would be much appreciated. ...

Pull Menu in CocoaTouch

Hi Everyone: I am attempting to make a UIView/UIControl that people can drag up and reveal a text box, and then drag down to hide it. However, I have yet to find a method to make this "fluid" - it always seems to stop at random places and doesn't allow any more movement. At the moment I am using a UIView for the top part of the view a...

Best way to orchestrate multiple views in iOS without UITabBar or UINavigationBar?

I'm trying to create an iPhone app with a welcome screen that leads to two or three pretty disparate UIs; once you've drilled into one you're not going to have much use for the others, and each one is itself fairly complicated. The designers are all web types and it looks like the "navigation" paradigm is the closest to what they want, ...

How to sort this NSMutableArray?

I made a class called Person. It looks like this Person ------- Name Points Then I created an NSMutableArray called team. It contains several of these person objects. I create several teams. Then I created another NSMutableArray called allTeams. It holds all the team arrays. I want to sort the allTeams array by the total number of p...

Tracking download progress of a response to a ASIFormDataRequest

Hi, I am sending a request with POST data to a web server. The web server returns with JSON response in case of an error or the file data itself if there are no errors. I would like to track the progress of the file data response. My code is based on the the sample code from ASIHttpRequest Tutorial ASIFormDataRequest *request = [ASIFo...

IPhone: Why does my app resume and not restart when I relaunch it on device?

I don't know if this is an iOS4 thing or something, but basically say I have a few screens in my app. Now, when I hit the home button and relaunch my app it launches the app on the screen where I left off. It's almost like it's not restarting my app, but resumes it. I don't want it to do that. (I'd like it to show my splash screen main m...

How can I refresh a NSFetchedResultsController?

I have a NSFetchedResultsController which displays data in a UITableView. I'm using the boiler plate code provided by Xcode when choosing to create a Core Data project. I added the following predicate to the NSFetchRequest the NSFetchedResultsController uses (before NSFetchedResultsController is initialized): NSPredicate *predicate = [N...

How to disable the fields in settings in iphone based on other setting?

On an iPhone, when you go to Settings > Nike + iPod, in the app's settings, when you set Nike+iPod to off, it disables the rest of the settings. How do I do that? How do I disable the other setting depending on the value selected in ToggleSwitchSpecifier? Can we do it using Setting.Bundle? Or do we have to use preference.Bundle? Can we u...

UIView to cover iPhone status/carrier bar

I am attempting to create a UIView (and associated UIViewController) which mimic the behaviour of UIAlertView. Given my requirements it seemed much neater to create my own implementation from scratch than attempt to subclass and modify UIAlertView. In order to do this I am getting a reference to the app delegate and then adding the UIVie...

How to change this code so the NSMutableArray is sorted?

I made a custom class. This is the h file @interface Player : NSObject { NSString *name; NSNumber *points; } @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSNumber *points; -(id) initWithName:(NSString *)n andPoints:(int)p; @end This is the m file #import "Player.h" @implementation Player @sy...

Iphone app rejected.

Hi, I had recently submitted my first Iphone app to itunes connect. After review I got an email from apple saying my app was rejected. The reason they provided was "Currently the user has to enter their email address in order to proceed to the application. Applications cannot require user registration prior to allowing acc...

How do you remove extra empty space in NSString?

Hi, is there a simple way to remove the extra spaces in a string? ie like... NSString *str = @"this string has extra empty spaces"; result should be: NSString *str = @"this string has extra empty spaces"; Thanks! ...

beginBackgroundTaskWithExpirationHandler

i m making audio play background application error in following code in this code bgtask is undeclared i do not find bgtask is which kind of object - (void)applicationDidEnterBackground:(UIApplication *)application { UIApplication *app = [UIApplication sharedApplication]; bgTask = [app beginBackgroundTaskWithExpirationHandler...

Stretchable image stretching part wider than 1px

I would like to create a UIButton which uses a stretchable image as Background image such as that I can easily resize the button for different labels etc. So I created the following code which works fine: UIImage *bgImage = [[UIImage imageNamed:@"Button-Template.png"]stretchableImageWithLeftCapWidth:2 topCapHeight:2]; UIButton *loginBu...

How do you handle a UIPickerView in UI Automation iPhone application testing?

In the following UI Automation script code, I'm able to get the values from a UIPickerView, but I'm not able to select the picker: var picker = window.pickers(); UIALogger.logMessage("picker array count: " + picker.length); var pickerWheels = picker[0].wheels(); UIALogger.logMessage("picker Wheel count: " + pickerWheels.length); va...

What kind of loading screen should I have

I'm making a navigation based application. When the user selects a row on the table view, it goes to the next table. However, depending on how many entries are on the table view, this can be instantaneous, or it can take a while. Something needs to be shown to the user that the program is working and is not frozen. I was thinking of br...