Questions tagged as 'swift'

1
answer

How to work with UILongPressGestureRecognizer in Swift using tables?

I need when the user presses the table cell to appear an alert with information. Follow the code import UIKit class MyTableViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() self...
asked by 15.07.2015 / 20:38
1
answer

How do I configure files for many Targets?

How can I configure Xcode to perform the following task:  Use 1 Target as a template for other targets, and some file / class to be included or changed in this template, can be referenced in other targets already created. And each file / clas...
asked by 21.05.2015 / 04:09
1
answer

ParseJson in Swift - login function

I have a method that does the verification of login and password using REST , but after reading I need to return a Bool value to validate if the login was done. I do not know if I'm doing it the best way, anyway the problem is th...
asked by 15.04.2015 / 04:11
1
answer

Automatic cell size in Swift

Hello, I have a project that has a tableview with custom cells, until Swift 1.1 method tableView.rowHeight = UITableViewAutomaticDimension in viewDidLoad and number of lines in 0, were already enough for my adapt to the character...
asked by 07.06.2015 / 21:17
2
answers

POST Request on Swift does not work

Good morning, I looked for several sites a way to do a POST request for a server, found several ways and tried all of them, but none worked. I can receive the data from the page and even send GET variables in the URL, but POST variables are simp...
asked by 12.03.2015 / 14:29
1
answer

NSObjectInaccessibleException - Deleting all objects from an entity - NSFetchedResultsController

I have a function responsible for deleting all the items of an entity: func removeItens() { if let managedContext = managedObjectContext { let fetchRequest = NSFetchRequest() let entity = NSEntityDescription.entityForName(...
asked by 02.02.2015 / 15:30
1
answer

iAd interstitial - close button

I'm trying to include a fullscreen iAD in an app, but the advertisement screen is showing up without the close button, the question is whether I have to do it by hand or have any hidden options for it? I found older things about this, but I d...
asked by 05.03.2015 / 04:52
1
answer

Unbundling with In App Purchase (IAP) Swift

I'm trying to use the In App Purchase to remove ads from my app, but the ads are located in a View other than where the IAP code is. I think I'm removing it in a non-efficient or wrong way, because the code is breaking in the remove function:...
asked by 21.01.2015 / 21:13
1
answer

How to use icon in a UIButton

How do I put an icon in UIButton through .storyboard ? Through .storyboard you have the options of UIButton between them you have the image option where I can tell a path to an image for the button. But I'd l...
asked by 03.12.2014 / 13:44
2
answers

iOS: open webview pdf in browser OR download pdf

I'm working on an iOS application with Swift. It works perfectly, however when I click on the pdf download link, it just displays the pdf. I wanted it to downdload OR open the pdf in the browser outside the webview. Anyone who has a solution wil...
asked by 08.08.2018 / 20:24