iphone

Custom view controller for Settings bundle?

I have an application with a settings view that loads settings dynamically from a remote server. It's working fine. I want to also make these available in iPhone Settings, but the Settings bundle seems to be limited to simple key-values loaded and saved to the local NSUserDefaults. Is there a way to specify a custom view for this? ...

Efficient ways of inserting a new cell into a sorted UITableView?

I am trying to insert a new cell into a table view where the data is sorted. Is there an easy & efficient way to do this using the API? The easiest way seems to be insert the new data into an NSMutableArray, sort using a sort descriptor, and call reloadData. This should only redisplay the visible rows, so it doesn't look too bad. Would...

UIScrollView scroll to bottom programmaticaly

hello, how can I make the uiscrollview scroll to the bottom within my code? or in a more generic way to any point of a subview? thanks. ...

Are there iPhone Notifications for all UIResponders?

I know about these notifications on the iPhone, as you may need them to scroll a text view into place when they are obscured by the keyboard: UIKeyboardWillShowNotification UIKeyboardDidShowNotification UIKeyboardWillHideNotification UIKeyboardDidHideNotification Right now, I have a some value that I want to update each time the user...

Not able to update existing application using Itunes

Hi all We have developed the iphone application version 1 and installed it in the iphone device when i try to install its version 2 or its updates via itunes than it doesn;t syn with the iphone and the run the last app that have been installed and i think it picks up from cache i want it in a manner that it overwrite the app over on t...

How can I change the default color of the button on iPhone when pressed?

Hi, The default color when a button is pressed on Iphone is blue. How can I change to some other color? The same applies to the case when I select a row of UITableViewCell. How can I change the color when selected? Thanks. ...

Custom action after ABPeoplePickerNavigationController is dismissed

Hey, I am presenting an ABPeoplePickerNavigationController to the user and asking them to select a contact. Once they select a user, I want to have them sent to either the Messages app or the Email app depending on what property they selected. However, I can't figure out how to customize the action that occurs after the modal picker is ...

How can glDrawElements() cause a EXC_BAD_ACCESS while drawing with texture?

I am getting a EXC_BAD_ACCESS on the the glDrawElements() in this code, but only when the bottom block of code is present. I am thinking it must be something conceptual that I am missing because I am not finding any nil pointers or other things that can typically cause this error. glScalef(6, 6, 6); glEnableClientState(GL_VERTEX_ARRAY);...

What is the standard way to organize iPhone MVC code in XCode?

I have an iPhone application that contains several views and their associated controllers. Looking at sample code, I've seen different different ways to organize these files - either have all of the views grouped, then all of the controllers grouped, or group the views and controllers by functionality. Option 1 - Views and controllers ...

Is there a way to make iPhone classes closed for editing and observing

I have classes we wrote for one our customers, to be used in their own iPhone code. We would like to make the classes sealed for observing and prevent the code from being copied like we would do in windows by a closed dll or compiled swf on flash. Any help will be appreciated. David. ...

How can I prevent UITextfield font size from becoming smaller as you type

I have initialized a text box to have font size 16. Now I have noticed that as I type beyond the boundary of the text box, iPhone decreases the font size and then scrolls. Now If I delete everything from the text box and start typing, it starts with the small font and never becomes 16. Could you let me know how can I fix this? Can I init...

UIButton: Need a circle hit area

Ok I have 6 custom UIButtons. Their normal state image are all circles images. They are all spaced out equally but all the circles touch each other. The problem with the custom UIbutton (which has a circle image on it), is that the hit area of that button is square, and the corners of this square overlaps the hitarea of the other custom...

Using shared C++/STL code with Objective-C++

I have a lot of shared C++ code that I'd like to use in my iPhone app. I added the .cpp and .h files to my Xcode project and used the classes in my Objective-C++ code. The project compiles fine with 0 errors or warnings. However, when I run it in the simulator I get the following error when I attempt to access an STL method in my obje...

provision file error in iPhone OS 2.2

I created an AppID "MyApp", DeviceID "MyDevice" in Program Portal and I downloaded the provision file and drag it to Organizer, downloaded the .cer file and install it on Mac. All these works fine, but when I build my app, an error pops up saying "CodeSign error: a valid provisioning profile is required for product type 'Application' i...

Changing the language for NSLocalizedString() in run time

I have an iPhone application which has a button to change display language in run time. I have looked at NSLocalizedString() which will return the appropriate strings according to system preference. What are my options rather than hard coding all the display strings and return according to user language selection in run time? Any pointer...

Sending tweets from iPhone apps using Oauth

Does anyone know of a good example utilizing the twitter API and Oauth authentication for iPhone SDK 2.2.1 or older? Found an example, but it seems to utilize a 3.0 only framework at http://ow.ly/bdpm . ...

how to resume/suspend a pthread in iphone os ?

hi,everyone. Now i face a problem in my porting job, when i need to implement a thread class that will work in not only wince, symbian ,but also unix-like system, like iphone. I own a suspend/resume interface to implement, anything is ok in wince/symbian except iphone, i use the posix pthread to finish my job, but i search the whole do...

In UIKit, how to detect when a UISlider has stopped moving but has not been released

I have a sound effect that I want to only play when the slider is moving. Currently I have the playSound method fire when the UISlider is sending Value Changed events. I need a way to detect when the slider is not being moved, yet hasn't been released. I think I can use the Control Events of it's super class to work out the timing but...

uibutton title alignment and multiline support

How do I set the title of a UIButton to be left aligned and, how can I show multiple lines of text in a UIButton? thanks and regards, raju. ...

How to create an Image from byte array.

Hi All!! M stuck M trying to create an UIImage from a byte array which i get from a webservice.It comes embedded in a XML.I can parse the XML and get the byte array as a string.Then I convert the byte array (which is in NSString) to NSData. This is the code for that:- Image_Content = currentElementValue; NSData* aDataImage; aData...