objective-c

Media Player Playback of mov fails

I'm uploading mov files selected with the uiimagepickercontroller to my amazon s3 bucket but when I then try to play them with the media player framework, I'm told it's an invalid format. Here's one: http://s3.amazonaws.com/irovr/users/9/92f7acd7-31b5-437c-8a30-16630e869d29/DEEDBFAE-8D41-4B52-B223-AA03B3A25491.mov ...

Don't understand memory analysis

Hi, I have upgraded my XCode to versio 3.2.3 to support iOS4 on my iphone project. using the static analyser I checked for memory management problems. In one of my routines I get the following problem: I generate a user alert after adding an event to the calendar to give him a status. This runs fine, but the memory analyser doesn't li...

Insert a string to a string in Objective C

I need to insert a string 'GMT' into "2010-07-13T11:22:33-07:00" before the last '-' (it could also be a '+') the result should be "2010-07-13T11:22:33GMT-07:00" ...

objective C for-loop break and continue

How can i use a 'break' statement within a for-loop which continues form a specified label? ex; outer: for(int i = 0;i<[arABFBmatches count];i++){ for(int i = 0;i<[arABFBmatches count];i++){ // break _____; } } How to break to outer? ...

mapview shows 0,0 location when fetching value from xml with space in address

hello , i'm quite novice in iphone s/w development i was on an application it requires to start mapview from the location specified in xml file but in xml file "address" having some spaces in it like "3300 Providence Dr Ste 6" but mkmapview show the location 0,0 instead to find in google api. so what i'll do to remove those spaces. i ha...

How to tell if iPhone application was launched by backgrounding or not.

My application uses NSUserDefaults to store some values so that it can restore them on application update or if backgrounding is quit. Backgrounding automatically saves my integer values, but if the user quits the application from the launcher, the numbers are lost too, and the ViewDidUnload method I guess doesn't evoke when entering bac...

How to avoid code duplication when defining many objects with various characteristics?

I think this must be a very common problem in game programming where you have lots of characters with various capabilities. I am using protocols to define actions for characters wherever feasible and inheritance when I need objects to share large blocks of code. The problem with protocols is that they only define the interface, so impl...

Releasing modal view content controller causes: CALayer release - message sent to deallocated instance

I'm trying to present a viewcontroller modally: - (IBAction)addReference { ReferenceAddViewController *referenceAddViewController = [[ReferenceAddViewController alloc] initWithNibName:@"ReferenceAddViewController" bundle:nil]; [referenceAddViewController setDelegate:self]; [self presentModalViewController:referenceAddViewC...

preparing a core data result set for a grouped uitableview

hi everyone, i've got a NSMutableArray created from a data source object NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy]; [self setAmountArray: mutableFetchResults]; every object in my mutable array has the two instance variables name and timeadded. now i want to ...

how access mysql remote database in iphone

hi all, i m using remote mysql database in my application. please give any idea how i connect the mysql remote database. i search many references but i have not get any exact soln for it. ...

How to round Decimal values in Objective C

Hi All, This may be a easy question but i am not able to find the logic. I am getting the values like this 12.010000 12.526000 12.000000 12.500000 If i get the value 12.010000 I have to display 12.01 If i get the value 12.526000 I have to display 12.526 If i get the value 12.000000 I have to display 12 If i get the value...

Change UIbutton Image on click

HI, I have stored 5 images in an mutable array and displayed them randomly on iPhone view by appending them in UIButton . now I want to change the image on a button on which i will click. but in my code only the last image changes not the image on which I called the action. Please help need urgently ...

How to retrieve part of the NSString * from NSString *

Hi, everyone, I want to ask an NSString * question. I have a NSString * object. The content is like the following example. (like the CSV file) Example: (my file is longer than this one so much) First Name,Last Name,Middle Name,Phone,Chan,Tim,Man,123-456-789,Tom,,,987-654-321 (if it is empty, no space between the ',') How can I use ...

iPhone Int with NSObject &/causes class can't reference itself

I've got a function called updateTheValue() that I have called using [self updateTheValue] for a while now. Two things happened recently; I added the method calling in the viewDidLoad() method and it spit out a warning saying my class may not respond to this. Second, I want to pass objects to updateTheValue() like strings, but mostly int...

Autosize UILabel

Is there a way to auto size a UILabel? given size 40 x 40 the text font size would adjust based on the number of characters. ...

How to insert NSString * between two NSString *

Hi, everyone, I want to ask an NSString * question. I have a NSString * object. The content is like the following example. (like the CSV file) Example: (my file is longer than this one so much) First Name,Last Name,Middle Name,Phone,Chan,Tim,Man,123-456-789,Tom,,,987-654-321 (if it is empty, no space between the ',') How can I inse...

Custom UINavigationController UIToolbar Background Image

I have an iPhone application using UINavigationController and would like to customize the elements with custom background images. I was able to do this for the UINavigationController's UINavigationBar pretty easily using Objective-C categories as below: http://foobarpig.com/iphone/uinavigationbar-with-solid-color-or-image-background.htm...

How do I change the name of my iPhone application?

HI everyone! i have application that uploded via other company(not my company) i decided to upload the application via my comany so... i can't upload my app on the same name as the company uploded alreday. there is a way that the other company can delete the app from app store or rename the application name, so i can upload the app...

Designing a MIDI synthesizer/player for the iPhone

The design is divided into the following parts/features. However, I'm not very familiar with the capabilities of the iOS SDK. Midi Parser read and parse a binary file into an object Play a single or multiple sound files simultaneously can this be done with one or multiple lookup table? (a huge switch statement?) Manipulate dura...

problem with intergating facebook session in iphone with objective-c

How to handle seesion in facebook . when user logs into my appliaction i want to keep the user logged in always which means that every times the user will open the application, he will not need to make login again. and when the user enter to my iphone applicaiton, the user should be shown as loggedin, and when i try to post to the user...