Filtering frequencies from .m4a data

I'm trying to analyze a sound file (.m4a) to get the amplitudes over time and make a graph. I found some code online that works great (below). However, I would like to additionally filter out all sounds that are not in a targeted frequency range. E.g...
more »

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

Image caching best practice for unique identifier

I am trying to build an app where I download a list of images from different URLs into a collection view. All these images are stored inside a cache with max age and cache limit. I am storing the URL as the key for each image so that I can check if t...
more »

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

Adding Thousand Separator Automatically (Swift)

I have a code for my calculator How could I do so that when the user would enter the numbers he would be separated by a space automatically? I've been trying to find an answer for a long time, but nothing fits that it was displayed right away ...
more »

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

Outputting sound through top iPhone speaker

I want to emit a sound from the top speaker of an iPhone -- the one used for phone calls -- while recording on the microphone. I can't work out how to get the sound to output from the desired speaker and having it come out from the same place as the ...
more »

2017-12-02 23:12 (0) Answers

Implement Reusable & Configurable ViewController

In my iOS app I need a common modal ViewController (lets call it GetData) across multiple parent ViewControllers. GetData needs to be configurable (as in hide/show some Views). GetData should be able to return data to the calling ViewController. Her...
more »

2017-12-02 11:12 (2) Answers

Issue with using searchbar

I am trying to implement a search functionality in one of my screens. This is the code that is posted... func searchBarTextDidBeginEditing(searchBar: UISearchBar) { searchActive = true; } func searchBarTextDidEndEditing(_ searchBar: UISearchBar)...
more »

2017-12-02 10:12 (1) Answers

OpenID connect together AWS Cognito

I'm trying to get myself authenticated with a custom openID connect provider. For retrieving my JWT token I use the following library: https://github.com/openid/AppAuth-iOS I have a custom OpenIDAuthHandler class. For retrieving my JWT token I hav...
more »

2017-12-01 13:12 (0) Answers

Implementing Facebook Places Search - City Only

I am implementing Facebook Places Search in my iOS application. Elsewhere in my application I am implementing a search where the user can only search Cities. Can I use Facebook Places to search Cities only? or do I have to implement another library i...
more »

2017-11-30 17:11 (0) Answers

How does imports work in swift?

I frankly have a hard time understanding how imports work in Swift. When I make a new class it will start out with: import foundation As an alternative we could use import Swift or import UIKit depending on what libraries we need. BUT I've noticed...
more »

2017-11-30 09:11 (2) Answers

UITextField padding

Im having trouble creating padding for leftView property of UITextField. The code I have now creates padding for the text which is nice, but I need it for the imageView. UITextField Subclass method: Notice x position of paddingView frame doesn't ...
more »

2017-11-30 07:11 (2) Answers

Understanding breakpoints and threads in swift

I am trying to wrap my head around debugging and threads in Swift/Xcode. I have added a breakpoint to the beginning of a method and in the callstack, I see several references to different methods. The first method is used to create the UIImageView, t...
more »

2017-11-29 13:11 (1) Answers

JSONDecoder in Swift4 from nested JSON

Using Swift4, iOS11.1, Xcode9.1, Trying to match the JSON-file in a decodable struct for Swift4, I end up with the following error message: "Expected to decode Array<Any> but found a dictionary instead." --> After finding two typo's - there i...
more »

2017-11-28 17:11 (2) Answers

Detect scrolling tableviewcell

I have a tableview that each cell contains a collectionview.How can I detect corresponding cell when user scrolls a collection? func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { if (lastContentOffset.x < (scrollView.content...
more »

2017-11-28 09:11 (1) Answers