Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [ios]

iOS is the mobile operating system running on the Apple iPhone, iPod touch, and iPad. Use this tag [ios] for questions related to programming on the iOS platform. Use the related tags [objective-c] and [swift] for issues specific to those programming languages.

ios
145 votes
6 answers
77k views

Why NSUserDefaults failed to save NSMutableDictionary in iOS?

I'd like to save an NSMutableDictionary object in NSUserDefaults. The key type in NSMutableDictionary is NSString, the value type is NSArray, which contains a list of object which implements NSCoding. ...
BlueDolphin's user avatar
  • 9,765
317 votes
35 answers
191k views

Adding images or videos to iPhone Simulator

I am trying to use UIImagePickerController with UIImagePickerControllerSourceTypePhotoLibrary, but it says, "No photos". Where does the simulator get the images from? Where should I copy the images so ...
Vijayeta's user avatar
  • 5,645
5 votes
1 answer
4k views

Display the iPhone keyboard

I've run into a problem with the UITextView that seems to be related to having a scrollable view within a scrollable view. In order to remedy this i thought i would attempt to write my own ...
Lounges's user avatar
  • 4,664
4 votes
5 answers
1k views

Software and hardware requirements for iOS development

What are the options for developing iPhone apps? Currently I've tried to install gnu kit for Linux without success! Too many steps, and at the and I was unable to compile a single app. The Apple SDK ...
gmuller's user avatar
  • 451
406 votes
21 answers
140k views

Can you animate a height change on a UITableViewCell when selected?

I'm using a UITableView in my iPhone app, and I have a list of people that belong to a group. I would like it so that when the user clicks on a particular person (thus selecting the cell), the cell ...
user avatar
256 votes
16 answers
115k views

How can my iphone app detect its own version number?

I'm writing an iPhone app. It's already been published, but I would like to add a feature where its version number is displayed. I'd rather not have to do this manually with each version I release......
user avatar
296 votes
21 answers
130k views

How can I programmatically determine if my app is running in the iphone simulator?

As the question states, I would mainly like to know whether or not my code is running in the simulator, but would also be interested in knowing the specific iphone version that is running or being ...
Jeffrey Meyer's user avatar
21 votes
7 answers
51k views

How do I reset after a UIScrollView zoom?

I have a Graph being drawn inside a UIScrollView. It's one large UIView using a custom subclass of CATiledLayer as its layer. When I zoom in and out of the UIScrollView, I want the graph to resize ...
Ed Marty's user avatar
  • 39.6k
376 votes
31 answers
199k views

Determine device (iPhone, iPod Touch) with iOS

Is there a way to determine the device running an application. I want to distinguish between iPhone and iPod Touch, if possible.
Rob's user avatar
  • 5,588
327 votes
34 answers
307k views

Adjust UILabel height depending on the text

Consider I have the following text in a UILabel (a long line of dynamic text): Since the alien army vastly outnumbers the team, players must use the post-apocalyptic world to their advantage, such ...
Mustafa's user avatar
  • 20.5k
3 votes
4 answers
17k views

iPhone SDK: Play a single WAV from a button

I am currently trying out this code: NSString *path = [[NSBundle mainBundle] pathForResource:@"dream" ofType:@"m4a"]; AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL ...
Domness's user avatar
  • 7,605
21 votes
7 answers
27k views

Customizing the More menu on a Tab bar

I am using a tab bar (UITabBarController) on my app and I wish to customize the appearance of the table that appears when you click the more button. I have worked out how to change the appearance of ...
Ian1971's user avatar
  • 3,696
76 votes
13 answers
34k views

iPhone "slide to unlock" animation

Any ideas as to how Apple implemented the "slide to unlock" (also, "slide to power off" is another identical example) animation? I thought about some sort of animating mask - but masking is not ...
user avatar
106 votes
15 answers
94k views

How to get RGB values from UIColor?

I'm creating a color object using the following code. curView.backgroundColor = [[UIColor alloc] initWithHue:229 saturation:40 brightness:75 alpha:1]; How can I retrieve RGB values from the created ...
defmech's user avatar
  • 1,317
1 vote
1 answer
2k views

Accessing image data from a bitmap given a pointer

My problem is reading the pixel data correctly once I have the pointer. So I have an image that takes up the whole iPhone screen and has no alpha channel (24 bits per pixel, 8 bits per component, 960 ...
user avatar

15 30 50 per page