swift

How to draw a circle in a circle using code

I want to draw a circle in a circle. It turns out that the outer white and blue inside it, the dimensions are all clearly ind ... circle.layer.cornerRadius = backgroundCircle.frame.height / 2 backgroundCircle.addSubview(circle) }

How can I draw such a multi-line with indents with UIBezierPath?

Goal: You need to draw a line like this. For more understanding-the blue segment is 5% of 100% of the sum ( and so I understa ... ere ready-made libraries for this? What approach/algorithms should I use to dynamically calculate the filling of the strip?

Speedtest in the app

Actually, there is a task to implement an Internet speed check in the application. We have our own speedtest server and I thi ... calculate the Internet speed? Is it enough to choose just one size gradation, or is it necessary to use all of them somehow?

Screenshot of Yandex maps/Yandex Maps screenshot

There is a view with some elements (including YMKMapView). You need to take a screenshot of the screen. I use the following c ... d to the gallery, but instead of the map fragment , the white background. What the result should be and what it really is:

How functional is the new Swift on Windows? [closed]

Closed. It is impossible to give an objective answer to this question . Answers to it are not accepted at the moment. ... ee activities, etc. Is it difficult to retrain from java to swift ? (logic, syntax, libraries/functionality, performance..)?

IOS 13 push token in php

I have a problem with push tokens in IOS 13 and higher. As you know, they come in this version in the format {length = 32, by ... SData format, and in my database, push tokens are stored in rows. Such a question - how to convert a string to NSData in php?

When scrolling the background on the iPad, the background twitches

The background consists of 88 images and has a total width of about 18,000 pixels. When moving the background using SKAction. ... ) } let sequence = SKAction.sequence([waitAction, moveAction, stopAction]) tunnel.run(sequence) } }

Please advise an example of integrating OpenStreetMap into an iOS app on Swift

How do I integrate OSM into an iOS app? Maybe someone has a project for an example? I will be glad of any information!

Authorization using the VK SDK

How can I access my vk account? Facebook has FBSDKLogginButton (), but vk doesn't. I tried hanging @IBAction func vkAutor ... ze(["photos"]) } But it gives an error How can I log in to my VK account?? Also, when VKSdk.authorize(scope) returns

An analog of the List (collection) List from Java in Swift

In Java, any objects could be added to the List. It was very convenient to create a class with various fields (integers, stri ... long ago I switched to swift and I can't find an alternative to such a collection interface there. Tell me if there is one?

Xcode 8 on High Sierra (10.13.1)

Good afternoon. I updated my mac to the latest OS, but did not take into account one point, namely the version of the icon co ... p and from there it will be updated (without data loss) to 10.12, on which there will definitely be no problems with xcode 8.

JSON parsing in Swift

Help me get the value of the "description" key, I can't figure out what to do with the value of the key, which is an array of ... lf.condition = weatherDescription print(weatherDescription) } }

MVC in IOS with storyboard

Hi everyone. I wondered about the MVC pattern. Specifically, everything is clear about the pattern itself. But I would like t ... e views, then do you need to view the layer at all? Please tell us if anyone wrote using MVC together with storyboard Thanks)

Swift Tab Bar and multiple views

Good day, tell me good people! In my project, there is one Tab Bar Controller and 5 buttons in the bottom panel, each of whic ... s pressed, the same viewcontroller opens and one is used webview? I tried Googling - but I didn't find the right solution...

How do I connect the VK SDK to swift?

I need to connect the vk sdk to swift. I want to use it to authorize users, to get a token, and then to run the API.

Text-to-speech in an iOS app (Swift)

I'm looking for ways to implement reading text in "TextField" by voice, like "TwitchAlerts" or voice-over in "Google Translat ... he desired article. I didn't find anything suitable on GitHub and the English version of Stackoverflow. Thank you in advance!

Xcode iPhone emulator

When running applications in Xcode, only 10-20% of the screen is visible on any of the suggested emulators. And you can't scroll up in any way. What could be the problem?

For what reasons will the increment and decrement (++ and--) be removed in Swift 3?

I'm slowly starting to learn Swift and programming in general. In one of the lessons, you will learn about increment, decreme ... came clear that all this will be removed in the third version. But why? According to the description, very convenient things.

Web view on swift

At work, I was given the task to write an application for iOS, which will only have a web-view, which will open the desired s ... e recreated. }} A white application window appears on the emulator and nothing else happens. Please tell me how to fix this

How do I convert Roman numerals to Arabic numerals?

Sample code: func romanToDecimal(romeChar: String) { var result = 0 var maxValue = 0 let romeCh = romeChar.upper ... ? val : -val } } print(result) } The problem is that there is an incorrect calculus of the final result