How to use wildcard in Firebase?

This is my Firebase database structure: ft-records userX@gmail_com 2013-01-01 00:00:00 GMT addedByUser: "userX@gmail.com" notes: "Boooo" time: "2013-01-01 00:00:00 GMT" 2013-01-02 10:00:00 GMT addedByUser: "...
more »

2017-03-19 23:03 (1) Answers

UITextView Hyperlink to Internal WebView

UITextView allows tappable attributedText based hyperlinks.The user interaction with the link can be intercepted by implementing the delegate method. textView:shouldInteractWithURL:in: which has two variations, for iOS 10 and one for iOS 9 as below. ...
more »

2017-03-19 22:03 (1) Answers

Creating UIImageView with a tag. Swift 3

I have an int n that holds value. I want to create a loop that will create UIImageViews with consecutive tags. My code: var n:Int = 1 if arrayOfEmojis.count != 0 { for emoji in arrayOfEmojis { let emojiView = self.view...
more »

2017-03-19 22:03 (1) Answers

CoreData splitting sections by String

I am trying to make headers for my tableview that are separated by date, which is a string. I am using core data and the NSFetchResultsController. I am basically making an agenda which will separate events based on a string date. I cannot find anyw...
more »

2017-03-19 21:03 (2) Answers

Downloading file with swift and objective-c

I have 2 projects with 2 different languages. Objective-c project and swift project to download the file from url. The problem is that in objective-c the file is downloaded more quickly than in swift. Why is this happening? How to fix it? my swift...
more »

2017-03-19 14:03 (1) Answers

How to cache several pages inside WkWebView

I don't understand the behavior of my WKWebView. I have a set of Url I need to cache. I'm using the returnCacheDataElseLoad policy for my cache, and it seems to cache something, but I get a blank page (Nothing is displayed) when I load it again. Here...
more »

2017-03-19 11:03 (0) Answers

swift: nsurlsession downloading files

There is a tableViewController with 5 cells. When I click on a cell, the download starts, if the file is not found. override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.row > 0 { let path...
more »

2017-03-19 06:03 (2) Answers

Switching function of UIButton

I have a UIButton and I want to case switch between functions of the button. The first case would be to print hello and the second case would be to print yes. And it will restart and keep going over and over again. I tried but I Keep failing. I tried...
more »

2017-03-18 23:03 (1) Answers

Multiple labels and segment views in Auto Layout

i'm having some issues with auto layout. I'm making an exercise app and i've built this display to configure the users units settings but i'm struggling with laying out the constraints. Here's how i want it to look... But here's what i get when i ...
more »

2017-03-18 15:03 (1) Answers

iOS - Error with constraints in storyboard

I would like to place the button through the constraints is the same for all devices. As you can see in the first picture (iPhone 6) the button is set properly, while the iPad Pro button is too low. How can I fix? Open pic ...
more »

2017-03-18 15:03 (0) Answers

Xib and Storyboard

I have two files xib and storyboard. In the xib file there is a custom menu for working with photos (brightness, saturation, etc.). Variable containing a photo is in ViewController. I created an @IBAction for each button in xib. How to transfer a pho...
more »

2017-03-18 14:03 (1) Answers

Calling View Controller Method From TabBarClass

I have a timer running in a tabbar class that saves data to the cloud each time it is called. Then i want it to call a method on the currently select view controller to tell the user what was saved. I am doing this with the following. if (self.s...
more »

2017-03-18 12:03 (2) Answers

SKSpriteNode slows down but shouldn't

I am trying to get my "word" to float across the screen; constant velocity, no impacts, no gravity, no friction. Everything works except the word slows down. Code for creating word: func createWordNode (word: String, atPos: CGPoint) -> SKSprite...
more »

2017-03-18 12:03 (2) Answers

How tables in Settings.app are implemented?

I need similar interface(as Settings has) in my app. Do not want to re-inventing the wheel and wondering are these two UITableViews or one with two sections? How implemented label("Double tapping...") under the neath then? Thank you. ...
more »

2017-03-18 12:03 (1) Answers

Firebase UI - Cannot create user with Facebook

I'm trying to create a user with Facebook on Firebase. I'm using Firebase UI sample auth iOS project. The steps I did so far: On Firebase console: Created the project Activated the Facebook auth Set the FB app secret On Facebook developers: C...
more »

2017-03-18 10:03 (0) Answers

Swift 3: How to get pixel colour on device?

How to get pixel colour on touch on the device, the below code works well on simulator but on device it returns wrong value. I don't know what was wrong To get pixel colour on touch i used the code func getPixelColorAtPoint(point:CGPoint, source...
more »

2017-03-18 06:03 (0) Answers

Why Is UITextField.text An Optional?

It starts out as an empty string instead of nil. Even when it is explicitly set to nil it remains an empty string. I don't get it. Perhaps to make it easy to clear by assigning nil? Writing code with it is clunky. var textField = UITextField() pr...
more »

2017-03-17 16:03 (2) Answers