Alamofire: Cannot call value of non-function type 'NSHTTPURLResponse?'
If this is, as you say, working fine in the other file a couple of suggestions come to mind.
- Mark the class you are extending as public. (Swift classes are internal by default.)
- Open the document inspector pane on the right of your class, make sure your target membership includes the target you are compiling for.
Let me know if your issue still persists and I will investigate further.
Cannot call value of non-function type '((UInt) - Data?)!' with Alamofire 4
I do see one issue with the line in question. Try not using the raw value of the enum like so:
let stringValue = value as! String
multipartFormData.append(data: stringValue.data(using: .utf8)!, name: key)
Class subscript cannot call value of non-function type
You need to use square brackets for subscript. This works in the playground:
class Grid {
var nodes: [[Int]] = [[1],[2],[3]]
subscript(row: Int, column: Int) -> Int {
get {
return self.nodes[row][column]
}
}
}
let grid = Grid()
let node = grid[0, 0] // node == 1
Swift 2 syntax error: Cannot call value of non-function type 'Int'
count is the swift 1.2 way,
in swift 2.0 use myString.characters.count
(any array can be counted that way)
so:
extension String {
func size()->Int{
return self.characters.count
}
}
Xcode error: 'Cannot assign to value: function call returns immutable value' in table views
It should be:
places[indexPath.row]["name"] as! String
As the type is Any
and you need to specify it as String
, since label
expects String
s.
Related Topics
Swift Callkit Sometimes Can't Activate Loudspeaker After Received Call (Only Incoming Call)
Data Ranged Subscribe Strange Behavior
How to Handle Parameter Validation Swift
Capturing a Struct Reference in a Closure Doesn't Allow Mutations to Occur
Swift For-In Loop with Enumerate on Custom Array2D Class
Calculate the Number of Dimensions of a Multi-Dimensional Array in Swift
In Swift, Can One Use a String to Access a Struct Property
Http Request Swift Providing Parameters
Swift Lazy Stored Property Versus Regular Stored Property When Using Closure
Making a Http Post Request in Swift 2
How to Calculate the Energy Per Bin in a Dft
Swift: How to Fix Infinite Loop When Adding a Value to a Firebase Variable
How to Segue Values When My Viewcontroller Is Embedded in an Uinavigationcontroller
I Can't Include ' Symbol to Regular Expressions
Swift: For-In Loop Requires '[Deepspeechtokenmetadata]' to Conform to 'Sequence'
Swipe Gesture Interrupts Uislider Control in iOS 13, But Not Previous iOS Versions