I started my studies in Swift , I am currently studying Swift 4 , but I came across a doubt, which I believe many people who are starting also have (or not).
In the course I'm seeing, the teacher teaches us how to develop apps...
I'm having trouble loading the items on a property list. Note my plist:
Here'smyfirstViewController:importUIKitclassPage1:UITableViewController{varfilePath:String?varemployees:[[String:Any]]=[]overridefuncviewDidLoad(){super.viewDidLoad()self.t...
Good afternoon.
I do not know how to do a different layout, specific to landscape ... but I wanted to do that in storyboard not in code, does anyone know? Thanks.
I'm passing a closure to an object's property, and within the closure I'd need to reference the instance of the object that will execute the closure. Example:
typealias validator : ()->Bool
class Field : NSObject {
var name...
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...
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?
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...
I try to be objective, I need to save a variable that the value that is stored inside will be the text of a label and this value is changed when an input of another variable is performed. For example:
Variable balance has the value of 50.0, t...
I'm making an app that requires multiple tableviews. Some of them have more than 20 cells and some only 4, 5.
Then I realized that doing 20 and so many lines of if else is a terrible practice. But since I'm very new to swift, I'd like to know...