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.
61,717 questions
1241
votes
40answers
417k views
Passing Data between View Controllers
I'm new to iOS and Objective-C and the whole MVC paradigm and I'm stuck with the following:
I have a view that acts as a data entry form and I want to give the user the option to select multiple ...
1034
votes
65answers
756k views
What does this mean? “'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X”
I'm trying to link a UILabel with an IBOutlet created in my class.
My application is crashing with the following error. What does this mean? How can I fix it?
*** Terminating app due to uncaught ...
1392
votes
25answers
500k views
Using Auto Layout in UITableView for dynamic cell layouts & variable row heights
How do you use Auto Layout within UITableViewCells in a table view to let each cell's content and subviews determine the row height (itself/automatically), while maintaining smooth scrolling ...
56
votes
6answers
38k views
Returning data from async call in Swift function
I have created a utility class in my Swift project that handles all the REST requests and responses. I have built a simple REST API so I can test my code. I have created a class method that needs to ...
559
votes
6answers
216k views
What are Unwind segues for and how do you use them?
iOS 6 and Xcode 4.5 has a new feature referred to as "Unwind Segue":
Unwind segues can allow transitioning to existing instances of scenes in a storyboard
In addition to this brief entry in Xcode ...
1331
votes
23answers
660k views
Transport security has blocked a cleartext HTTP
What setting do I need to put in my info.plist to enable HTTP mode as per the following error message?
Transport security has blocked a cleartext HTTP (http://) resource
load since it is insecure....
1594
votes
90answers
597k views
How can I make a UITextField move up when the keyboard is present?
With the iOS SDK:
I have a UIView with UITextFields that bring up a keyboard. I need it to be able to:
Allow scrolling of the contents of the UIScrollView to see the other text fields once the ...
1265
votes
40answers
415k views
How to check for an active Internet connection on iOS or macOS?
I would like to check to see if I have an Internet connection on iOS using the Cocoa Touch libraries or on macOS using the Cocoa libraries.
I came up with a way to do this using an NSURL. The way I ...
73
votes
1answer
15k views
Speed up fetching posts for my social network app by using query instead of observing a single event repeatedly
I have an array of keys which lead to post objects for my social network like so /posts/id/(post info)
When I load the posts I load /posts/0 and then /posts/1 etc using the observeSingleEventOfType(....
1199
votes
25answers
445k views
How do I sort an NSMutableArray with custom objects in it?
What I want to do seems pretty simple, but I can't find any answers on the web. I have an NSMutableArray of objects, and let's say they are 'Person' objects. I want to sort the NSMutableArray by ...
701
votes
19answers
328k views
How do I create delegates in Objective-C?
I know how delegates work, and I know how I can use them.
But how do I create them?
423
votes
25answers
234k views
Symbolicating iPhone App Crash Reports
I'm looking to try and symbolicate my iPhone app's crash reports.
I retrieved the crash reports from iTunes Connect. I have the application binary that I submitted to the App Store and I have the ...
486
votes
30answers
148k views
How to develop or migrate apps for iPhone 5 screen resolution?
The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels).
What is required to develop new or transition already existing applications to the new screen size?
What ...
1111
votes
44answers
1.1m views
How can I develop for iPhone using a Windows development machine?
Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?
The only other way I can think of doing this is to run a Mac VM image on a ...
487
votes
32answers
156k views
UIDevice uniqueIdentifier deprecated - What to do now?
It has just come to light that the UIDevice uniqueIdentifier property is deprecated in iOS 5 and unavailable in iOS 7 and above. No alternative method or property appears to be available or ...