Why does xcode not see my app-bridge-header and tells me the file GIDSignInDelegate is undeclared?

Swift
I'm following this tutorial for using google sign in https://developers.google.com/identity/sign-in/ios/sign-in?configured=true&ver=swift on my io...
3 years ago

Format timer label to hours:minutes:seconds in Swift

Swift
I have an NSTimer which counts DOWN from 2 hours until 0. Here are some of my code: var timer = NSTimer() let timeInterval:NSTimeInterval = 0.5 let ...
3 years ago

Swift metatype (Type, self)

Swift
I am trying to understand : "self, dynamicType, Type". I have this code : class SomeClass {} let cls : SomeClass.Type = SomeClass.self let cls2 : So...
3 years ago

Swift interstitial ad on viewDidLoad (AdMob)

Swift
I am following this tutorial So far I have got it to work when I click the button. However I cannot seem to get it to show an interstitial ad on view...
3 years ago

Can Firebase be reliably used for detecting reachability instead of iOS reachability APIs

Swift
I recently started working on an iOS app powered by firebase. I was wondering if using firebase's special location /.info/connected is a good way to d...
3 years ago

Access variable of an enum nested in struct in a protocol extension in Swift

Swift
I am implementing a converter that easily converts double type parameters of a run into proper unit according to the provided unit style, metric or im...
3 years ago

Turning translucency off on navigation bar missalignes views

Swift
I have created layout with navigation bar and I have turned navigation bar translucent to no. I have added this code: var overlay : UIView? // This s...
3 years ago

How do I convert an Int value into NSData in Swift?

Swift
In Objective-C I use the following code to Convert an Int variable into NSData, a packet of bytes. int myScore = 0; NSData *packet = [NSData dataWi...
3 years ago

How to stop UIActivityIndicator after UISearchBar has finished in Swift

Swift
So my set up: I'm have an app set up with Parse, and I'm using a PFQueryTableViewController. I've added a UISearchBar to my screen. I have this searc...
3 years ago

Passing data to custom UITableViewCell with adding subviews

Swift
I'm passing data to a custom UITableViewCell and based on that data I want to show or hide a dynamically added subview. I'm reusing a cell which is cr...
3 years ago

Set high score as elapsed time in iOS

Swift
The high score in my game is time based and I am having trouble setting comparing it with the current score. This is my code so far which doesn't work...
3 years ago

How to select a cell in table view without scrolling it?

Swift
I am building the settings screen for my app using a table VC. In the viewDidLoad, I want to show the user his/her current settings by selecting the c...
3 years ago

Passing Data in Swift Between View Controllers in Same File

Swift
Why can't I pass data from one view controller class to another view controller class when they are in the same .swift file? I've done both of the tu...
3 years ago

Using YTPlayerView to play embedded YouTube video in iOS failed with restriction error

Swift
I want play embedded YouTube video in iOS app using YTPlayerView provided at https://developers.google.com/youtube/v3/guides/ios_youtube_helper When ...
3 years ago

Starting and stoping functions using button clicks in swift

Swift
On my ViewController I have six UIViews lined up horizontally representing each of the colors of the rainbows. I have gotten many different things to ...
3 years ago

Swift: Change UISwitch status when a button is clicked on with the same tag

Swift
I have this function which gets a UISwitch with the same tag value as the button that triggers the function, and it is then meant to change the status...
3 years ago

CoreData Swift: Fatal error: unexpectedly found nil while unwrapping an Optional value

Swift
override func viewWillDisappear(animated: Bool) { //need to add a device? if profile == nil { if let name = nameTextField.text, species = species...
3 years ago

Error using NSErrorPointer to parse .csv

Swift
Continually getting this error when trying to pass an NSErrorPointer to a parser function as a parameter. The function definition is: func parseCS...
3 years ago

Why doesnt my timer countdown to 0 in Swift?

Swift
I have this timer and it starts at 3 and it should countdown to 0 but it stops at 2. I don't get why it doesn't go all they way down to 0. Can you ple...
3 years ago

Type 'Custom TableViewController' does not conform to protocol 'UICollectionViewDataSource'

Swift
Type 'Custom TableViewController' does not conform to protocol 'UICollectionViewDataSource'. I have created a project using Swift and have a UITableV...
3 years ago