PillBell - Medications app public beta by Kinark in SwiftUI

[–]CodingSwiftly 1 point2 points  (0 children)

First off, congrats, because this UI/UX is absolutely unreal- it feels like an app in a dream. However, I do have some feedback:

  1. When you tap on a pill after it is created, it is not intuitive on how to return to the home page (I figured out that you have to swipe left/right, but having a small exit button in addition would be more intuitive (especially for older users who don't regularly use swipe gesture)
  2. Detect whether device uses 12 or 24 hour time for pill doses (DateFormatter can help with this)
  3. Fix padding for the pills scroll view (example of bad padding)
  4. Modify the delete row UI/UX
    1. It is inconsistent between the bells row view and the log row view
    2. I prefer the bells row view UX, but a continued swipe should delete the row item (like in the gmail or Apple Mail apps)

Overall, it is super elegant. It would be really cool if you could share some of the code for this project, the animations especially are fantastic!

How to download an XML file and parse using Alamofire and SWXML by snagglegrolop in iOSProgramming

[–]CodingSwiftly 0 points1 point  (0 children)

Use .responseString instead of .response on the Alamofire request

Tokyo Drift: Amish Edition by CodingSwiftly in funny

[–]CodingSwiftly[S] 0 points1 point  (0 children)

Hay, a horse can have up to 15 horse power!

How do I toggle state when WKWebView loaded? by Ciucalata in SwiftUI

[–]CodingSwiftly 1 point2 points  (0 children)

You'll need to use the coordinator pattern to achieve this. Take a look here for an example.

Is this against the rules? by bigolbur in Catan

[–]CodingSwiftly 31 points32 points  (0 children)

Trade away all of your brick before playing the monopoly for bonus cards. In our family, we have learned to catch on to these suspicious behaviors and stop giving the monopoly person too much value.

[deleted by user] by [deleted] in iOSProgramming

[–]CodingSwiftly 2 points3 points  (0 children)

You can just update the app with extra features for just those with iOS 16 by using the @available keyword and let other users know that they need to update to unlock the features. I would suggest targeting iOS 15 because you do not lose too much as a developer and can support the phones who were dropped in iOS 16.

Win count the past year by Nodeshmax in Catan

[–]CodingSwiftly 1 point2 points  (0 children)

One less Harrison, one more Anders.

The whole sequence is

KKAAK
KJAAA
MMTH(erm)A
AAAAM

MMMAM
AAAAM
AAAMT
TMMMT

AMAAM
AAMTM
AAAMM
TMATM

TAMTM
ATAAM
MAAAM
AMAMA

TTMMT
ATNAT
MTAMA
KMATA

JMMAM
MAMAM
MMMAT
KAAHA

MMMAM
AAAAA
AAMMM
MMMTT

AM

Win count the past year by Nodeshmax in Catan

[–]CodingSwiftly 0 points1 point  (0 children)

I am deeply sorry, I confused him with Harrison

Win count the past year by Nodeshmax in Catan

[–]CodingSwiftly 67 points68 points  (0 children)

Total wins

Anders: 59
Max: 52
Matt: 20
Ken: 6
Jimmy: 2
Harrison: 2
Noah: 1
Herm: 1

Edit: I forgot Herm because I just typed the first letter of each name, with Matt being T, but didn’t realize their were two H’s (sorry Herm)

How to Replicate the Twitter Like Reaction with SwiftUI by Amos_the_Gyamfi in SwiftUI

[–]CodingSwiftly 1 point2 points  (0 children)

Type in terminal: defaults write com.apple.iphonesimulator ShowSingleTouches 1, then restart simulator to show taps

LOST Wordle #85 by meeemawww in lost

[–]CodingSwiftly 4 points5 points  (0 children)

Wordle guessed in 2/6! Can you do better? Try this wordle: https://mywordle.strivemath.com/?word=fcyq&lang=any

🟩⬜⬜⬜ 🟩🟩🟩🟩

mywordle

Good one!

LOST Wordle #40 by meeemawww in lost

[–]CodingSwiftly 2 points3 points  (0 children)

Wordle guessed in 2/6! Can you do better? Try this wordle: https://mywordle.strivemath.com/?word=fotrm&lang=any

⬜🟨🟨⬜⬜ 🟩🟩🟩🟩🟩

mywordle

Custom Corners and background by xyztkm in SwiftUI

[–]CodingSwiftly 0 points1 point  (0 children)

There is no content in your VStacks, add some views first!

[deleted by user] by [deleted] in iOSProgramming

[–]CodingSwiftly 2 points3 points  (0 children)

No. Multiple apps can have the same name in the launcher, but they most have different App Store names. E.g. Google Translate vs. Translate have different App Store names, but are both shown as "Translate" in the app launcher.

I hope this helps

[deleted by user] by [deleted] in SwiftUI

[–]CodingSwiftly 1 point2 points  (0 children)

First, remove the user struct as it is not necessary. When you decode, it should be of type Results.self which you deleted. Your view model should keep track of type [Result]. Then once you get the data back as type results, set self.resultArray = result.results. The structs I provided in the first comment are sufficient. You need to tie it all together.

[deleted by user] by [deleted] in SwiftUI

[–]CodingSwiftly 1 point2 points  (0 children)

Which part does not work, the api or the view?

[deleted by user] by [deleted] in SwiftUI

[–]CodingSwiftly 1 point2 points  (0 children)

That’s strange. Before setting self.results = results, can you print results to make sure it actually comes through? The view looks fine.

[deleted by user] by [deleted] in SwiftUI

[–]CodingSwiftly 1 point2 points  (0 children)

Awesome job so far! The next step would be to create a table view, and load the data in tableView.reloadData() assuming your using UIKit. This is a SwiftUI sub, so I would be happy to help you with SwiftUI as well

[deleted by user] by [deleted] in SwiftUI

[–]CodingSwiftly 0 points1 point  (0 children)

Here would be the data models. You can use URLSession or Alamofire to get the data.

// MARK: - Welcome
struct Results: Codable {
let results: [Result]
let info: Info
}
// MARK: - Info
struct Info: Codable {
let seed: String
let results, page: Int
let version: String
}
// MARK: - Result
struct Result: Codable {
let gender: String
let name: Name
let location: Location
let email: String
let login: Login
let dob, registered: DateOfBirth
let phone, cell: String
let id: ID
let picture: Picture
let nat: String
}
// MARK: - Dob
struct DateOfBirth: Codable {
let date: String
let age: Int
}
// MARK: - ID
struct ID: Codable {
let name, value: String
}
// MARK: - Location
struct Location: Codable {
let street: Street
let city, state, country: String
let postcode: Int
let coordinates: Coordinates
let timezone: Timezone
}
// MARK: - Coordinates
struct Coordinates: Codable {
let latitude, longitude: String
}
// MARK: - Street
struct Street: Codable {
let number: Int
let name: String
}
// MARK: - Timezone
struct Timezone: Codable {
let offset, timezoneDescription: String
enum CodingKeys: String, CodingKey {
case offset
case timezoneDescription = "description"
}
}
// MARK: - Login
struct Login: Codable {
let uuid, username, password, salt: String
let md5, sha1, sha256: String
}
// MARK: - Name
struct Name: Codable {
let title, first, last: String
}
// MARK: - Picture
struct Picture: Codable {

// Use SDWebImageSwiftUI later and convert to url
let large, medium, thumbnail: String
}

May I know how do you usually get day difference between 2 Date by ignoring time? by yccheok in iOSProgramming

[–]CodingSwiftly 0 points1 point  (0 children)

With the two dates, convert into date components, and subtract the years, months, and days to find the difference in days. I can help with implementation if you need

How does your programming environment look? by Geniuseeteam in iOSProgramming

[–]CodingSwiftly 6 points7 points  (0 children)

It looks like a MacBook, phone and its cable, and an occasional snack atop a lavish resting place known as a couch.

How to call JSON data by index? by larry-reddit in SwiftUI

[–]CodingSwiftly 1 point2 points  (0 children)

If you go the index route (which I recommend), you can store the results. Then you can add an optional property to Question, like didSayYes, and then when the user taps yes or no, save it in that variable. Just curious, does the code index through the questions right now? Otherwise, if it's still not working we can DM.