Top "Cocoa-touch" questions

The Cocoa Touch Frameworks that drive iOS apps share many proven patterns found on the Mac, but were built with a special focus on touch-based interfaces and optimization.

Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?

I'm trying to link a UILabel with an IBOutlet created in my class. My application is crashing with the following …

ios macos cocoa cocoa-touch interface-builder
Vertically align text to top within a UILabel

I have a UILabel with space for two lines of text. Sometimes, when the text is too short, this text …

ios cocoa-touch uikit uilabel text-alignment
How would I create a UIAlertView in Swift?

I have been working to create a UIAlertView in Swift, but for some reason I can't get the statement right …

ios swift cocoa-touch uialertview uialertcontroller
How can I disable the UITableView selection?

When you tap a row in a UITableView, the row is highlighted and selected. Is it possible to disable this …

ios uitableview cocoa-touch
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 …

ios objective-c sorting cocoa-touch nsmutablearray
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 …

ios macos cocoa cocoa-touch reachability
How to get the screen width and height in iOS?

How can one get the dimensions of the screen in iOS? Currently, I use: lCurrentWidth = self.view.frame.size.width; …

cocoa-touch ios uikit screen
How do I size a UITextView to its content?

Is there a good way to adjust the size of a UITextView to conform to its content? Say for instance …

ios cocoa-touch autolayout uikit uitextview
Attempt to present UIViewController on UIViewController whose view is not in the window hierarchy

Just started using Xcode 4.5 and I got this error in the console: Warning: Attempt to present < finishViewController: 0x1e56…

ios cocoa-touch ios6 views hierarchy
Placeholder in UITextView

My application uses an UITextView. Now I want the UITextView to have a placeholder similar to the one you can …

ios objective-c cocoa-touch uitextview placeholder