Questions tagged as 'swift'

2
answers

Validate if the data is null

How can I validate if a URL in my database is NULL and if so, show an alert but if it has a URL, open it func Facebook(sender: AnyObject) { if let url = NSURL(string: face){ let alert = UIAlertView(title: "Aviso!!!", message: "Mmmm...
asked by 17.08.2016 / 20:51
1
answer

Conversion error NSData in NSString

I have the following code to convert the body of a post request into a string let body: NSData = self.createBodyWithParameters(paramString, filePathKey: "image_name", imageDataKey: imageData!, boundary: boundary, nameParam: "dparam_string_post...
asked by 22.08.2016 / 08:58
1
answer

Swift error when running the app: dyld: Library not loaded:

When I run the app both in the simulator and on a device, it closes and shows me the following error: dyld: Library not loaded: @ rpath / DatePickerDialog.framework / DatePickerDialog   Referenced from: /Users/bimo/Library/Developer/CoreSimul...
asked by 25.09.2018 / 21:58
1
answer

pass an array with swiftyJson to model using JSON with init (SWIFT 4.2)

I have a JSON where there is an array of images, I want to use SwiftyJson to bring that array ... and in the model I use an initializer - > init (json: JSON), so when iterating with: let suggestions = json["industries", "Suggestions"...
asked by 30.08.2018 / 18:34
2
answers

UIBarButtonItem Xcode

I need to be able to center this image in the middle of my UIBarButtonItem Currently seen: what I would like This is my Swift code func setupNavigationBar(showBack:Bool, showMenu:Bool, showFilters: Bool) {...
asked by 06.10.2018 / 07:36
1
answer

UITable type Accordion IOs Swift 4

I have the following UITable @IBOutlet weak var resultsTableView: UITableView! let sectionTitles = [NSLocalizedString("movementsPayTitle",comment:""), NSLocalizedString("movementsCollectTitle",comment:"")] func getCell(cell: QueryPayme...
asked by 30.04.2018 / 21:22
1
answer

How to modify the value of a global variable from Alamofire

For example, I need to change the value of the variable existUser which by default is initialized as false to true but when the variable is finished it being in false and only the value true is kept within the response of Alamofire i...
asked by 14.07.2017 / 17:43
2
answers

libc ++ abi.dylib: terminating with uncaught exception of type NSException

I get the following error when running the application: objc[1951]: Class PLBuildVersion is implemented in both/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Priv...
asked by 10.03.2017 / 19:23
1
answer

Inconsistency with Calendar.dateComponents in swift

I have the variable fecha that when doing print shows per console: 2016-11-20 23:00:00 +0000 The problem is that when you do this: let auxCalendar = calendar.dateComponents([.weekday, .day, .weekdayOrdinal, .month], fro...
asked by 21.11.2016 / 11:21
1
answer

Alamofire iOS error only with app archived

Apologies for sending the question in English ... I'm having problems making HTTP requests with the iOS Alamofire library. The strange thing is that when I run the application from the XCode itself I do not get any errors but I compile and insta...
asked by 21.10.2016 / 13:40