Only use this tag if your question is about a specific change introduced in `Swift 3.2`. For generic Swift questions, use the [swift] tag.
Questions tagged [swift3.2]
79 questions
2
votes
2 answers
reloadRows will create new cell
When I call this code:
tableView.reloadRows(at: [IndexPath(item: index, section: 0)], with: .none)
tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell =…

craig wang
- 19
- 3
2
votes
1 answer
Swift 3.2 - compiler doesn't let me use the Darwin.kevent global function
This was working in Swift 3.1, however once I switched to Xcode 9 it stopped compiling. Here's a sample code:
let kq: Int32 = 0
let changelist: UnsafePointer! = nil
let nchanges: Int32 = 0
let eventlist: UnsafeMutablePointer! =…

Cristik
- 30,989
- 25
- 91
- 127
2
votes
1 answer
Why is it possible for a Swift function to return a mathematical operator alone?
I'm completely at a loss on how the addTwoNumbers function in the Swift playground code sample below can return "(+)" as a function of type (Int, Int) -> Int and later successfully add the two numbers together by simply calling…

Mark E.
- 106
- 7
1
vote
0 answers
How to get image size from image url without downloading in swift
I need image size from URL, When I set image from URL in UITableView
cell, Then I need a frame of UIImage so that I can set UIImageView
Frame size accordingly. I am using below code
cell.imgPostedImage.sd_setImage(with: URL(string:…

Pintu Rajput
- 621
- 2
- 8
- 23
1
vote
1 answer
Unit test cases - Swift 3.2
I have to write unit test case to check whether a particular method gets called or not from within the method which is being called from unit test case.
class A{
func fetchPersonsData() {
let b = B()
b.sendDataToserver([])
…

srus2017
- 394
- 2
- 14
1
vote
1 answer
How to refresh JWT token status Code 500 in Alamofire Swift
Thanks for have look on my question. I get into point. I have to refresh JWT token using Alamofire Swift. Token expire every 30mins so while I'm making POST or GET Request token may expired and hits error code (status code) 500. Then i have to…

Pranavan SP
- 1,785
- 1
- 17
- 33
1
vote
1 answer
How to ignore a remote/push notification while app is on background/terminated
Technologies Used:
Firebase Cloud Messaging
Swift 3.2
Xcode 9.2
To give you a background here's the data I'm sending via FCM on an api server
{
"priority": "high",
"content_available": true,
"alert": true,
"sound": true,
…

Zonily Jame
- 5,053
- 3
- 30
- 56
1
vote
1 answer
Type 'UILayoutPriority' has no member 'defaultHigh'
When using this code in our app, we run into an error:
let value = UILayoutPriority.defaultHigh // Error: Type 'UILayoutPriority' has no member 'defaultHigh'.
which is super wired because according to the documentation, it is obviously there. And…

Yuchen
- 30,852
- 26
- 164
- 234
1
vote
1 answer
AWS Cognito And S3 Authentication
How to securely upload image to S3 bucket from my IOS app built using Swift3.2. I have been using AWSCognito and S3 to upload but without using any authentication.I have a custom login for my app.Anyone who uses my app can upload image to S3.Also if…

Geethanjali Reddy
- 213
- 3
- 17
1
vote
0 answers
Decodable: filter items in array that fail to decode
How can I ensure that I only filter out Person B below since Person B is the only malformed object?
The documentation for currentIndex on UnkeyedDecodingContainer states:
The current decoding index of the container (i.e. the index of the
next…

Remover
- 1,616
- 1
- 17
- 27
1
vote
1 answer
ScrollView not working ios
My ScrollView contains a container view, which in turn has a textView whose height depends on the content and is dynamic.I have enabled the scroll for textview but it doesn't seem to work.I tried to set the content size of scroll view even in…

Geethanjali Reddy
- 213
- 3
- 17
1
vote
1 answer
'closure cannot implicitly capture a mutating self parameter' error in struct
This is the code is used don't know why this error occurring even i cannot use weak self with struct. want to store blackWhite image of image which existing on selectedicon URL :
struct ServiceViewModel {
private var service: Service
var…

SuryaKantSharma
- 1,113
- 12
- 27
1
vote
1 answer
pass array values as parameters of function swift
im new to swift.I tried to follow many tutorials but still im not able to find a solution for it.
I want to pass values stored in an array to a function.
let trackList = ["AC","BB"]
for trackId in trackList{
let ind = trackList.index(of:…

Geethanjali Reddy
- 213
- 3
- 17
1
vote
0 answers
iOS 11, completion of transitionCoordinator.animate() never called
I have wrote a FadeSegue class that override perform function from its super, UIStoryboardSegueclass.
import Foundation
import UIKit
class FadeSegue :UIStoryboardSegue{
override func perform() {
let screenShotView = UIImageView()
…

Mohsenasm
- 2,916
- 1
- 18
- 22
1
vote
1 answer
UICollectionView selection/deselection methods not triggering
Basically I have a UIPageViewController which has multiple UICollectionView on each pages.
The problem is I can select/deselect on collectionViews inside the first page. But when I switch to second page, numberOfSections, numberOfItemsInSection,…

J. Goce
- 279
- 3
- 10