iphone

UIBarButtonItem icon white when added via IB, black when added programmatically

When I add an icon to a UIBarButtonItem via the Interface Builder, the icon is displayed white. When I add the same icon file programmatically to another UIToolbar, the icon is displayed black. Why? UIImage *image = [UIImage imageNamed:@"icon.png"]; UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setImage:image ...

How to add a badge to a UITabBar that is customizable?

I am adding a badge to my UITabBarController's UITabBar as such: UITabBarItem *tbi = (UITabBarItem *)[stTabBarController.tabBar.items objectAtIndex:1]; tbi.badgeValue = @"2"; However, my UITabBarController is customizeable, so the index may change. How can I make sure the badge gets applied to the correct UITabBarItem? ...

Push Notifications working with iPhone development provisioning profile?

I have my development app installed on my iPhone with the development provisioning profile. Do push notifications work with the development provisioning profile, or only on distribution? I'm curious because push notifications are working just fine on distribution, but not with the development app. Thanks! ...

How to get Soundfilenames from an NSArray and play?

Hello, I want to play several audiofiles (*.wav) by touching the appropriate UImageViews. Each touching an UIImageView changes an "triggernumber" - wich view is selected. The audiofile names are stored in an array. But I can't figure out how to write a method to get the names and play the right sounds without using a select case method w...

jQuery val() opens keyboard

Hello, I am using jqTouch for my web app which is running on different phones including the iPhone. The issue I have is with the iPhone. When I set a value on the form using the jQuery function val(), the keyboard opens up automatically. I don't want that to happen when I am changing the value or just adding a default value to a pre-ex...

Best cocoa component to make an interface like html table

Hello, What's the best component to make an interface like this: tks ...

Is NSMutableArray writeToFile recursive?

Does NSMutableArray support recursive serialization? E.g. will a NSMutableArray of NSMutableArray's serialize the entirety of the heirarchy out when calling writeToFile? Example: NSMutableArray *topArray = [[NSMutableArray alloc] init]; NSMutableArray *bottomArray = [[NSMutableArray alloc] init]; NSString *foo = @"foo"; NSString *bar...

After upgrade in app purchase product id is invalid

Hello, I'm testing my in app purchase code for an update to my app. The in app purchase works great when I do an install from xcode to my phone. The issue arises when I have the currently released version installed on my phone then I install the dev version over the top of the release version. When I install in this way my product ID...

iPhone Objective-C: How to disable the "delete all" with extended backspace pressing in UITextView

By "delete all," I mean what happens when you have a lot of text and you hit backspace for a few seconds, and the text view clears completely. I want to disable that function for my application. How can I do this (if it's even possible/allowed)? Thanks in advance!! ...

How can I convert a NSString representation of a time value into two NSInteger's containing the hour and minute?

Hello. I'm diving into iOS development and the Objective C language and am building an alarm clock app to become familiar with the SDK and language. I have an NSString object that represents a time, with the range "1:00 am" to "12:59 am". I need to convert this NSString into two NSInteger's that contain the hour value and minute value...

Install iphone development apps remotely

Is there a way to install iphone apps in development stage (not distribution) remotely? can I send the user the binary and install the app via itunes? ...

Playback decompressed G.711 mu-law audio on iPhone

What is the best way to playback decompressed G.711 mu-law audio in iOS? Thanks, Rob ...

Programmatically discover identity of first responder

I want a UITextField to be sent the resignFirstResponder message if it is being edited and a user touches elsewhere on the screen. Since there are several text fields I need a way to programmatically determine which one is the first responder to send it the message. How can I do this? Is there some sort of global first responder object? ...

Add nib into UIScrollView

I am having troubles with the UIScrollView. I have a file called: ExhibitionViewController.h / m and a nib ExhibitionView.xib in which I have placed a UIScrollView. I have a file called ExhibitionSubViewController.h / .m and ExhibitionSubView.xib which I would like to display within that UIScrollView and I cannot seem to get it to work...

Convert char to int to NSString

I am writing some code to allow users to answer multiple choice questions. So I have an NSArray of values [@"value1", @"value2", ..] I want to display them as: A) value1 B) value2 The code I have is for(int i = i; i < [values count]; i = i+1) { NSString *displayValue = [[NSString alloc] initWithString:<NEED HELP HERE>]; displayValue =...

What is the difference between building an iphone app in Xcode and reopening it on the iphone? Wh

My application brings up a different view each time it is built in Xcode. This is exactly what I want it to do. However, if I simply press the back to menu button in the simulator and then reopen it the view does not change. I am changing the view by overwriting the viewDidLoad function in a Custom View Controller. Why is it that ViewDid...

How do I find the current position in the mapview

How can I get the longitude, and latitude of the current position showing on the mapView? Thanks. ...

Implement a Back Button on Navigation Bar in iPhone App

Just recently took over a project from my developer. I'm a noob to coding, but can figure things out pretty well. I'm just trying to implement Back button on one of my screens. It already has the navigation Bar, but no back button, just the title. Is there a guide on how to get this implemented? Any help would be great! Thanks! Updat...

Compare NSDate objects only in terms of year month day

If I want to use the compare method to compare two days: [day1 compare:day2] == NSOrderedAscending How to compare only by year-month-day? ...

Saving data to plist per object or person

hi guys, i am trying to save data to the plist in my app per person, but it save it to everyone, so for example if i have a field for eye color and i enter brown in the textfield for john doe, it save brown for everyone else as well, is there a way to save this info per person in the app instead using plist, i have had no luck trying th...