Questions tagged as 'swift'

0
answers

Link in an NSAttributedString

I have a string that is actually a snippet of HTML. I use the following method to convert this snippet to a string and set it to let s = Descricao.data(using: String.Encoding.unicode)! let attrStr = try? NSAttributedString( dat...
asked by 28.12.2018 / 14:23
0
answers

Range of an Array in SWIFT

I have an array of bytes and I need to find out what range (startindex and endindex) a byte is or if it only has startindex ex: var Faixa1:Array<UInt16> = [2,4,6,8,10,11,12] var Faixa2:Array<UInt16> = [1,2] var Valor1:UInt16 =...
asked by 23.10.2018 / 21:19
1
answer

Problem with collectionView

Hello, good afternoon. I'm facing a problem with collectionview swift, it just does not appear, I do not quite understand this issue, but it does not get into the cell collectionView routine, I do not know if it's really working well, so I'd...
asked by 22.10.2018 / 20:29
1
answer

WebView does not capture gestures

WKWebView loads the link but I can not do anything on the site ViewController import UIKit import WebKit class promoVC: UIViewController{ @IBOutlet weak var webView: WKWebView! override func viewDidLoad() { super.viewDidLoad()...
asked by 05.10.2018 / 14:44
1
answer

Remove all subviews from a Stack View

At a certain time in my application I consume an API and add buttons in a Stack View. The name of my Stack view is "viewPossibleAnswer". for answer in newListsResponses { let newButton = UIButton() newButton.setTitle(answer.sentence, for:...
asked by 25.09.2018 / 21:36
1
answer

How to convert NSData to URL

Friends I have an image saved in SQLite, I have read the image and put it in an NSData variable I now need to give play in this NSData but the component expects a URL NSURL *urlVideoFile = [NSURL fileURLWithPath:stringVideoPath]; //NSAsser...
asked by 15.09.2016 / 22:31
1
answer

NSLocalizedString does not recognize Localizable.strings strings

Next I'm trying to use the swift string localization system, but apparently it does not recognize the strings, for example instead of appearing the string Home appears txtinicio, I'm trying to access the strings like this: NSLocalizedString("t...
asked by 13.09.2018 / 16:03
1
answer

UITableView vs UiScrollView which is the best option - Swift

Hello, I have the following doubt, there is a problem (and a good practice) I use a UiTableView to create the layout of my apps or it would be more recommended I use a UiView with a UiScrollView, considering that these layout may or may not cont...
asked by 16.08.2018 / 23:56
1
answer

How to disable pinch gesture effect with Swift 4 in Xcode9

How do I disable the zoom of my WKWebView? My application is allowing zooming on the screen, I would like to disable this function. How should I proceed? import UIKit import WebKit class ViewController: UIViewController, WKNavigationDe...
asked by 03.08.2018 / 20:44
1
answer

Actions within webview - iOS

Good afternoon! Can someone help me? I'm starting in iOS development and I'm having a problem. A website in which I'm creating a webview (with MKWebView) issues alerts to the user when I take action but in the webview I can not make that notific...
asked by 11.08.2018 / 23:54