You should convert one type to the other one so both variable should be the same types:
var result: Double = Double(textfield) * VAT
More Related Contents:
- Why create “Implicitly Unwrapped Optionals”, since that implies you know there’s a value?
- Waiting until the task finishes
- How do I resolve “ambiguous use of” compile error with Swift #selector syntax?
- What is the difference between a weak reference and an unowned reference?
- How can I use String substring in Swift 4? ‘substring(to:)’ is deprecated: Please use String slicing subscript with a ‘partial range from’ operator
- Escaping Closures in Swift
- How to compare enum with associated values by ignoring its associated value in Swift?
- Non-‘@objc’ method does not satisfy optional requirement of ‘@objc’ protocol
- Swift 2 ( executeFetchRequest ) : error handling
- Forced to cast, even if protocol requires given type
- Xcode Swift am/pm time to 24 hour format
- SwiftUI dismiss modal
- Number of words in a Swift String for word count calculation
- How do I make a custom initializer for a UIViewController subclass in Swift?
- Deinit never called
- Difference between flatMap and compactMap in Swift
- Generic function taking a type name in Swift
- How to multiply two arrays element-wise
- Creating json in swift
- Why my return is nil but if i press the url in chrome/safari, i can get data?
- Multiple workers in Swift Command Line Tool
- Add Local Notification in iOS 10 – Swift 3
- Projecting the ARKit face tracking 3D mesh to 2D image coordinates
- Why convenience keyword is even needed in Swift?
- Xcode: Using custom fonts inside Dynamic framework
- Separating multiple if conditions with commas in Swift
- Swift alternative to performSelectorOnMainThread
- Equivalent of or alternative to CGPathApply in Swift?
- Using Codable on a dynamic type/object
- Class ‘ViewController’ has no initializers in swift