Questions tagged [swift4]

Use this tag only for questions directly related to changes in version 4 of Apple's Swift programming language. Use the tag [swift] for more general language questions, or the tags [ios], [cocoa], [apple-watch] etc. for questions about developing on Apple platforms.

Swift 4 is the fourth version of the Swift language developed by Apple that was released in 2017. The language is open source and available on Github (see ).

The development of Swift 4 and its goals can be viewed on the Swift Programming Language Evolution repository on GitHub.

5684 questions
1
vote
2 answers

Swift date format with millisecond component

All, I have a date format "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" and I need to set the millisecond value, but date component does not provide millisecond attribute. Below is my code for setting custom values in hour, minute, second. I also need to set…
Ravi
  • 881
  • 1
  • 9
  • 23
1
vote
2 answers

Done/Cancel Button is not showing Issue In Toolbar(Simulator tested)

I added a toolbar with done and cancel button but the buttons are not appearing on the toolbar. I could not find the cause of this issue. i tried many changes but the issue is not resolved. This is the code regarding the toolbar: @IBOutlet weak…
Sk Sk
  • 21
  • 5
1
vote
0 answers

Creating a private pod framework which is dependent on an external pod

I created a Framework in xCode called 'IdFramework', and also created a .podspec file for IdFramework. Part of the swift files in IdFramework are dependent on external CocoaPods such as Firebase. So, I created a podfile in the root directory of…
Idanis
  • 1,918
  • 6
  • 38
  • 69
1
vote
1 answer

Web Socket Connection- refused/failed connection in iOS Swift - Starscream/RxStarscream

I have been facing Ann issue with Websocket to connection, I have tried several methods to get connected, but always showing connection refused or failed connection. The library I have using is Starscream ref:-…
Aleesha
  • 124
  • 2
  • 21
1
vote
1 answer

iOS 14.1 Facing issue with keyboard

Keyboard keys not visible Hello, all I am facing an issue with the keyboard, when I tap on the textfield it opens the keyboard but the keys are not visible on the click it works but not visible.
1
vote
1 answer

swrevealcontroller not working after navigation to homepage

I am new to Swift and I am trying to implement side navigation using SWrevealcontroller I have a root VC which has a button when click on this button I am navigating to UITabBarController Here is how my storyboard looks like (below) and this is how…
Rigsby
  • 180
  • 2
  • 14
1
vote
1 answer

Swift 4 DateFormater from string always nil

I have a date like so: 2020-10-01T00:00:00 And I'm trying to format it using this: let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss" let dateRequired = formatter.date(from: self.objects[indexPath.row]["DateRequired"]…
user979331
  • 11,039
  • 73
  • 223
  • 418
1
vote
1 answer

How to handle Alamofire Response in ios swift 4?

I am able to integrate POST request using Alamofire. I am fetching following response. but I need to add "docname" key docs into array. Could you please anyone guide me to handle this response My Response: { "ResponsePayload": { …
Gopal
  • 35
  • 4
1
vote
1 answer

Parsing dynamic optional Key-Value JSON in Swift

how to parse dynamic key (!papLZgcMalaVpYzStU:com.matrix.in":)value or modified these two struct for dynamic key handling struct Join : Codable { let papLZgcMalaVpYzStUcommatrixin : !papLZgcMalaVpYzStU:com.matrix.in? enum…
9to5ios
  • 5,319
  • 2
  • 37
  • 65
1
vote
1 answer

ThumbNail Generator could not get frame width in PryntTrimmerView CocoaPod

I am using PryntTrimmerView CocoaPod for my Video Trimmer app. Everything is working fine but my PryntTrimmerView does not show any Frames from video rather the View stays blank. I checked the Log and it seems, the Thumbnail Generator is getting…
Nazmul Hasan
  • 123
  • 6
1
vote
1 answer

Accessibility Voice One for Date in a String

I have below code. let text = "as of 07/29/2020" textLabel.text = text Voice Over read it - "as of 07 slash 29 slash 2 Thousand 20" How can i make it to pronounce like "as of July, 29 2 Thousand 20"
Akhil Shrivastav
  • 427
  • 3
  • 13
1
vote
1 answer

UITableView not visible until tapped on screen

I am new to swift, I am working on an application I Have 2 different API to get banner data and tableView Data, for the Images I am getting URL from server . After the Banner is loaded and running I am populating the UITableView, problem is either…
Rigsby
  • 180
  • 2
  • 14
1
vote
0 answers

Want to kill iOS App while in suspended state

I want to kill my application if it is in the suspended mode for more than 30mins so that when it relaunches it fetches new data. I have looked all over but wasn't able to find a solution to it. If anyone can recommend something it will be a huge…
Mohsin Khubaib Ahmed
  • 1,008
  • 16
  • 32
1
vote
1 answer

Can I move UIbarButtonItem over hidden buttonItem

Can programmatically move the position of Add UIBarButtonItem to the right of the navigation bar. I already have a button there when the button is hidden, I want to move Add button to its position. I used this code to hide the right cornerBtn: if…
1
vote
1 answer

High CPU Usage when parsing large json data with Date Strings Swift

I am working on a chat application. I get conversations list containing data related to conversations. Json response looks like below [ { "id": "1021", "title": "Test Group", "memberCount": 250, "isGroup": true, "ownerId":…
rohit phogat
  • 137
  • 1
  • 10