Join us in building a kind, collaborative learning community via our updatedCode of Conduct.

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.

1987
votes
47answers
581k views

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 is displayed in the vertical center of the label.How do I vertically align the text to always be ...
1724
votes
26answers
449k views

What's the difference between the atomic and nonatomic attributes?

What do atomic and nonatomic mean in property declarations?@property(nonatomic, retain) UITextField *userName;@property(atomic, retain) UITextField *userName;@property(retain) UITextField *...
1558
votes
88answers
589k 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 ...
1354
votes
24answers
475k 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 ...
1286
votes
23answers
619k 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://) resourceload since it is insecure....
1227
votes
37answers
401k 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 ...
1206
votes
39answers
410k 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 ...
1190
votes
19answers
167k views

performSelector may cause a leak because its selector is unknown

I'm getting the following warning by the ARC compiler:"performSelector may cause a leak because its selector is unknown".Here's what I'm doing:[_controller performSelector:NSSelectorFromString(@"...
1176
votes
26answers
439k 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 ...
1143
votes
20answers
517k views

How do I check if a string contains another string in Objective-C?

How can I check if a string (NSString) contains another smaller string?I was hoping for something like:NSString *string=@"hello bla bla";NSLog(@"%d",[string containsSubstring:@"hello"]);But ...
1081
votes
45answers
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 ...
1077
votes
35answers
411k views

How can I disable the UITableView selection highlighting?

When you tap a row in a UITableView, the row is highlighted and selected. Is it possible to disable this so tapping a row does nothing?
986
votes
65answers
721k 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 ...
926
votes
51answers
573k views

How to change Status Bar text color in iOS

My application has a dark background, but in iOS 7 the status bar became transparent. So I can't see anything there, only the green battery indicator in the corner. How can I change the status bar ...
897
votes
32answers
418k views

How to change the name of an iOS app?

I began an iPhone project the other day with a silly development code name, and now I want to change the name of the project since it's nearly finished. But I'm not sure how to do this with Xcode, ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,