Solutions Pool

Feature
Link

Remove repeating questions

...

Countdown

var countdown = 10

while countdown > 0 {
    print("\(countdown)…")
    countdown -= 1
}

print("Blast off!")

/*
print:

10…
9…
8…
7…
6…
5…
4…
3…
2…
1…
Blast off!

*/

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-use-a-while-loop-to-repeat-workarrow-up-right

Disable the field if it is empty

Image in a Text

Local Currency

Multiline TestFields

Parameters over Arguments

Always prioritize parameters (placeholders) over arguments (actual values).

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-reuse-code-with-functionsarrow-up-right

Random Number in a defined range

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-use-a-while-loop-to-repeat-workarrow-up-right

Random Number in a defined range until a particular target

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-use-a-while-loop-to-repeat-workarrow-up-right

Remainder of multiple numbers

Source: https://www.hackingwithswift.com/review/sixty/exiting-loopsarrow-up-right

Sum / Count until a certain point

Example 1;

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-skip-loop-items-with-break-and-continuearrow-up-right

Example 2;

Source: https://www.hackingwithswift.com/quick-start/understanding-swift/why-would-you-want-to-exit-a-looparrow-up-right

Swipe-Left to Delete

Watermark

Last updated

Was this helpful?