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 is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that presently powers many of the company's mobile devices, including the iPhone, iPad, and iPod Touch.

It should not be confused with i5/OS, which is one of IBM's operating systems for the IBM Power Systems (originally AS/400), or with Cisco's IOS (Inter-network Operating System).

iOS Latest Stable Release: iOS 14.3 (18C66) released on December 14, 2020

Latest Preview: iOS 14.4 beta 1 (18D5030e) released on December 16, 2020

iOS is a derivative of Apple's OSX desktop operating system, with which it shares many (but not all) common frameworks and other components. These include Cocoa Touch (the counterpart of the OS X Cocoa UI Framework), the Mach/Darwin/XNU kernel and code from the Berkeley Software Distribution (BSD).

Applications for iOS are written for the Cocoa Touch framework (as opposed to OS X's Cocoa framework) using the same Xcode IDE for official use (i.e. for submitting applications to Apple's App Store) or using unofficial (mostly command-line only) toolchains for various operating systems (including Linux) for unofficial/jailbroken development. OS X is based on the Darwin-OS foundation, itself based on several Unix descendants. On June 2nd, 2014, Apple announced a new language, Swift, which could be used to develop apps for iOS. Swift was in beta until September 9th, 2014, and is, since September 17th, 2018, at version 4.2.0.

Each iOS application runs in its own secure sandbox to prevent (accidentally or intentionally) altering other applications, the operating system, or any other data. Since iOS 8, an iOS application can have extensions that extend custom functionality beyond the application. iOS is optimized for the power, graphics, processor, and memory constraints of mobile devices.

The user interface of iOS is based on the concept of direct manipulation through multi-touch gestures. Interface control elements consist of sliders, switches, and buttons, all included in Apple's UIKit Framework. Interaction with the OS includes gestures such as swipe, tap, pinch, and reverse pinch, all of which have specific definitions within the context of the iOS operating system and its multi-touch interface.

Internal accelerometers and gyroscopes can be used by applications to respond to the user shaking the device (one application is the undo command) or rotating it in three dimensions (one common result is switching from portrait to landscape mode or autorotation).

Apple initially adapted features from OS X to create iOS, but that cycle is now bidirectional. Many features on OS X 10.7 OSX Lion were implemented first in iOS, including application sandboxing, an OS X App Store (and the implied widespread third-party app code signing), the content-centric ("natural") scrolling direction, along with AV Foundation, Core Location, and a few other frameworks.

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It includes almost ten thousand libraries to help programmers scale projects. A popular alternative is Carthage, which is a decentralized dependency manager, meaning that it does not store a central list of available projects.

Use the tag for questions about Cisco's IOS operating system for Cisco network routers.

Please follow the article My App Crashed, Now What? by Ray Wenderlich, before posting any questions relating to app crashes. It explains how to properly debug an iOS app. It's pointless to ask questions relating to crashes when you don't have a proper backtrace and exception message.

Before you ask about custom controls: I want this type of control. Please visit cocoacontrols once. You will get lots of custom controls, animation, libraries and much more which is available in Swift and Objective-C.

Before asking about a topic, just search it in https://developer.apple.com/documentation/ also, which is the developer documentation provided by the apple which covers a lot of information regarding iOS development.


Resources


Chat Rooms

Chat about iOS with other Stack Overflow users


If you are moving from Objective-C to Swift, but you don't know anything about Swift, then you can convert your Objective-C code/project to Swift. Use the following third party link.

Related Tags

Platforms:

Programming languages:

IDE:

Frameworks & extensions:

Distribution:

656272 questions
99
votes
8 answers

How to handle image scale on all the available iPhone resolutions?

What sizes would be the best to use for images: background.png, background@2x.png and background@3x.png if we want to use this image for example to cover the full width and half height of the screen on all resolutions for iPhone portrait app? This…
Leszek Szary
  • 8,558
  • 1
  • 49
  • 46
99
votes
8 answers

How to use SCNetworkReachability in Swift

I'm trying to convert this code snippet to Swift. I'm struggling on getting off the ground due to some difficulties. - (BOOL) connectedToNetwork { // Create zero addy struct sockaddr_in zeroAddress; bzero(&zeroAddress,…
Isuru
  • 27,485
  • 56
  • 174
  • 278
99
votes
2 answers

NSDictionary - Need to check whether dictionary contains key-value pair or not

I just need to ask something as follow. Suppose I am having a dictionary. NSMutableDictionary *xyz=[[NSMutableDictionary alloc] init]; [xyz setValue:@"sagar" forKey:@"s"]; [xyz setValue:@"amit" forKey:@"a"]; [xyz setValue:@"nirav" forKey:@"n"]; [xyz…
Sagar R. Kothari
  • 23,587
  • 48
  • 158
  • 226
99
votes
8 answers

Controlling the screenshot in the iOS 7 multitasking switcher

I've been trying to find some information regarding the new multitasking switcher in iOS 7 and especially the screenshot that the OS takes when the app is going into hibernation. Is there any way to completely turn off this feature or screenshot?…
Tommie
  • 1,887
  • 1
  • 13
  • 23
99
votes
6 answers

Changing the status bar text color in splash screen iOS 7

I know that are already some stackoverflow questions that say how to change the status bar for all view controllers. I am currently changing the color of status bar this way: if(IS_IOS7) [[UIApplication sharedApplication]…
Tiago Almeida
  • 13,437
  • 3
  • 62
  • 80
99
votes
6 answers

What size should TabBar images be?

I have icons for a tabBar of size 100. I checked at Apple's Human Interface Guidelines of 2013 and it says the image size should be 30x30 / 60x60. But as the height of tab bar controller is 50, I kept the size of the image at 50x50. Now, when I run…
Fahim Parkar
  • 28,922
  • 40
  • 153
  • 260
99
votes
1 answer

GMSGroundOverlay animating - should I be using a CATiledLayer?

I am experimenting with the Google Maps for iOS SDK latest version 1.2.1.2944 to animate a GMSGroundOverlay. The user has control over the image sequence, so using an animated UIImage isn't a possibility sadly, so i'm loading in the UIImage on the…
RobWhistler
  • 1,023
  • 1
  • 7
  • 6
98
votes
7 answers

Check if a subview is in a view

I'm making an app where I add a subview to a view using addSubview: on an IBAction. In the same way, when the button with that IBAction is touched again should call removeFromSuperview on that subview added on that IBAction: PSEUDO…
pmerino
  • 5,220
  • 10
  • 52
  • 75
98
votes
14 answers

How to detect when keyboard is shown and hidden

How can I detect when the keyboard is shown and hidden from my application?
user198725878
  • 5,878
  • 14
  • 72
  • 131
98
votes
14 answers

Getting the current page

In my scroll view, I want to get the current page that's being displayed (maybe page isn't the correct term). I can't find any variable that holds this. But I think it must be held somewhere, since the indicator is able to show which sub-view of the…
user440096
98
votes
8 answers

When to use PNG or JPG in iPhone development?

I have an app that will display a bunch of images in a slideshow. Those images will be part of the bundle, thus distributed with the app. All the images are photographs or photographic, etc. I've read that it's preferred to use PNG as the image…
Maverick
  • 1,659
  • 2
  • 16
  • 19
98
votes
10 answers

Getting reference to the top-most view/window in iOS application

I'm creating a reusable framework for displaying notifications in an iOS application. I'd like the notification views to be added over the top of everything else in the application, sort of like a UIAlertView. When I init the manager that listens…
typeoneerror
  • 51,338
  • 32
  • 124
  • 213
98
votes
12 answers

iPhone system font

What is the name of the default system font on the iPhone? I would like to retrieve this for customizing a UIView.
SK9
  • 29,437
  • 32
  • 112
  • 154
98
votes
9 answers

Adding a UILabel to a UIToolbar

I'm trying to add a label to my toolbar. Button works great, however when I add the label object, it crashes. Any ideas? UIBarButtonItem *setDateRangeButton = [[UIBarButtonItem alloc] initWithTitle:@"Set date range" …
user8359
98
votes
21 answers

Alamofire invalid value around character 0

Alamofire.request(.GET, "url").authenticate(user: "", password: "").responseJSON() { (request, response, json, error) in println(error) println(json) } This is my request with Alamofire, for a certain request it sometime works, but…
Lord Vermillion
  • 4,916
  • 13
  • 61
  • 99
1 2 3
99
100