Add random elements to an array (swift)

I have a VC with a tableView inside where i fill manually an array by multiple selecting of items from my tableView's rows. In this VC i have an array var list : [QCategoryy] = [QCategoryy]() list = NearbyPlaces.getCategories() where getCategorie...
more »

2017-11-15 14:11 (1) Answers

Xcode 9.1 - Ambigous reference to member filter

I already experienced this issue in the past, I fixed it. But today I just download the new Xcode version 9.1 and my App is not building anymore, I got : Ambiguous reference to member 'filter' I don't know why, this is not the piece of code I ...
more »

2017-11-15 14:11 (1) Answers

Filtering audio in AudioKit

What i need to do: record audio file; as it's record from iPhone/iPad microphone it can be quiet, so i need to filter it to make it louder; save filtered record; I'm new in audio programming, but as I understand so far I need "All Pass" filter (i...
more »

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

Carthage Xcode 9 Error

I try to install Carthage in my project but it always crash on launch. Nothing works from what I've tried.. Error: dyld: Library not loaded: @rpath/StarscreamSocketIO.framework/StarscreamSocketIO Referenced from: /private/var/containers/Bundle/App...
more »

2017-11-14 08:11 (1) Answers

Getting values out of view model structs

I'm pretty new to swift. Currently, I'm attempting to create a view screen programmatically in Swift 4. The screen is supposed to have a number of images and textlabels. I created a view model with a struct of several declared images and strings. Th...
more »

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

Swift 4 : Set Different Date and Time

I know how to get local date and time, but what I want to do is getting the date and time from different places. For example, I want to find out what the time and date is in New York. How can i solve this simple problem? Here is my code for local da...
more »

2017-11-13 19:11 (3) Answers

Audiokit MIDI initialisation is confusing

CoreMIDI terminology is already super confusing and badly documented, and Audiokit isn't helping as much as I wished it might. As far as I can tell, each application is supposed to have one instance of a midi client reference (MIDIClientRef). Audiok...
more »

2017-11-12 21:11 (0) Answers

URL parsing error with Arabic text

I am trying to translate Arabic to English using a web service. I get an error when constructing the URL. I've defined these cases: enum MyErrors: Error { case urlParsingError(String) case nonDictonaryObjectReturned(Any) } And my code is: ...
more »

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

Converting a city name to coordinates in Swift

I saw few questions on SO but all of them are old in Swift 2. I got this function from Apple website to convert a city name to latitude and longitude but I am not sure what the function will return (since there is nothing after return statement) and ...
more »

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

Xcode UITableView Cell Background not working

I want to color a single TableViewCell, and in the beginning it works correctly, but then it just messes up and colors also other random cells. I'm leaving the code and some screenshots, hope you can help. I'm using Xcode 9 and swift 4. override fu...
more »

2017-11-11 01:11 (2) Answers

Make reusable component in Xcode storyboard

I have a specific situation but what I'm looking for is a generic solution. Currently I have a UIImageView that contains an image, a few labels, and multiple levels of constraints. I would like to configure this set of controls' properties once and r...
more »

2017-11-11 00:11 (2) Answers