Questions tagged as 'swift'

1
answer

Error when running app directly on iOS device

I have an app that runs perfectly on the simulator, the same is already signed with my dev account. But when I try to build to run on a "physical" device some errors happen, I tried to reinstall the libraries used by Pods and I tried to delete t...
asked by 13.08.2018 / 18:01
1
answer

Enumeration Swift 4 - What is its usefulness and how does it work for IOS development?

Well guys, I'm studying a lot to start developing an application in Swift 4 for a job interview, but the Type Enum left me a little, almost nothing, but still confused. I wanted to know a bit more about this Swift 4 language element, how...
asked by 10.08.2018 / 22:17
1
answer

XCode - Adapt / fill screen for iPad mode

I recently started learning to program in XCode. After seeing some tutorials, I started working on a demo of an app whose initial menu features 5 buttons positioned vertically on a stack and a side image as shown in the following image: This...
asked by 25.05.2018 / 17:55
3
answers

How to handle a reponse.result.value that returns as optional log ([])?

I am in the following situation I have a request in Alamofire that returns me a json that may have data or not (usually has but might not). I want to handle when the response.result.value returns optional ([]). I tried this but it did not wor...
asked by 05.04.2018 / 14:56
2
answers

How to display the loading indicator on Swift 4 with WKViewWeb

Hello, I'm trying to show the loading indicator while my page is being read, but it did not work. I searched the internet, but I do not have the complete code and I'm a beginner in Swift. Can you help? import UIKit import WebKit class ViewCon...
asked by 02.04.2018 / 00:40
1
answer

How to get the iphone model

I'm starting with swift and I need to get the exact IPHONE template from the client, I already tried UIDevice returns Iphone or Ipad and I need to know if the device is an SE, 7, 8+, X, etc. Does anyone know how to do it?     
asked by 02.01.2018 / 18:43
1
answer

AutoLogin without firebase SWIFT3 IOS

I would like to know how I can save the user information and do not need to log in whenever I minimize or close the app without the use of firebase.     
asked by 14.11.2017 / 15:27
1
answer

remove parts of a string and return parts removed - Swift

How do I remove parts of a string and return those removed parts to another string in Swift? Example: var myString = "10setembro2017" let newString = myString.removeAndReturn(index:1..2) print(myString) //setembro2017 print(newString) //10...
asked by 18.10.2017 / 23:12
3
answers

Change font size according to iOS device

I have an App of sentences and each sentence has a different size (according to the amount of words) and in tablets as the resolution is the same as the iphone 4s the sentences extrapolate the size reserved for them and are behind a button that...
asked by 08.11.2017 / 10:52
1
answer

How to Copy Certain Bytes of a Date Type in Swift

As an example I android to do what you want to use the following: byte[] byte = ....; byte[] resultado = Arrays.copyOfRange(byte, 1,3); And I want to do the same thing in Swift, and in this case instead of being type byte [], it is of type...
asked by 21.06.2017 / 17:16