---
title: "#swifttips articles | Hashnode"
description: "Explore 4 articles tagged #swifttips on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/swifttips"
---

Tag

# #swifttips

4 posts · 1 followers

[Phạm Trung Huy](https://hashnode.com/@huypham85) · [May 13, 2024](https://hashnode.com/posts/swift-code-explained-implementing-safe-array-subscription/6641c83de551c373820dd4e4)

### [Swift Code Explained: Implementing Safe Array Subscription](https://huypham85.hashnode.dev/swift-code-explained-implementing-safe-array-subscription?utm_source=hashnode&utm_medium=feed)

When working with arrays in Swift, you might have come across a common error called “Fatal error: Index out of range”. This error typically occurs when you unintentionally try to access an index that is not present in the array. Actually, accessing e...

2 min read · [huypham85.hashnode.dev](https://huypham85.hashnode.dev/swift-code-explained-implementing-safe-array-subscription?utm_source=hashnode&utm_medium=feed)

[Truong Nguyen](https://hashnode.com/@truongnn) · [Apr 7, 2024](https://hashnode.com/posts/simplifying-array-initialization-in-swift-with-arrayrepeating/6612c43908cb9600ff3809c5)

### [Simplifying Array Initialization in Swift with Array(repeating:)](https://truongnn.me/simplifying-array-initialization-in-swift-with-arrayrepeating?utm_source=hashnode&utm_medium=feed)

When developing in Swift, a common requirement is to initialize an array where multiple elements share the same initial value. This scenario can arise in various contexts, such as setting up default configurations, pre-filling data structures, or ini...

1 min read · [truongnn.me](https://truongnn.me/simplifying-array-initialization-in-swift-with-arrayrepeating?utm_source=hashnode&utm_medium=feed)

[Phạm Trung Huy](https://hashnode.com/@huypham85) · [Mar 22, 2024](https://hashnode.com/posts/making-a-completionhandler-safer-in-swift/65fd8942fe5f40daa88ffbd8)

### [Making a CompletionHandler Safer in Swift](https://huypham85.hashnode.dev/making-a-completionhandler-safer-in-swift?utm_source=hashnode&utm_medium=feed)

Asynchronous programming in Swift often involves using completionHandler within functions to handle events. While this approach is common, there are potential pitfalls that developers need to be mindful of. One such pitfall is that there is no guaran...

2 min read · [huypham85.hashnode.dev](https://huypham85.hashnode.dev/making-a-completionhandler-safer-in-swift?utm_source=hashnode&utm_medium=feed)

[Phạm Trung Huy](https://hashnode.com/@huypham85) · [Mar 17, 2024](https://hashnode.com/posts/stop-using-lowercased-to-compare-strings-in-swift/65f6749f5e201912c4915b62)

### [Stop Using .lowercased() to Compare Strings in Swift](https://huypham85.hashnode.dev/stop-using-lowercased-to-compare-strings-in-swift?utm_source=hashnode&utm_medium=feed)

When developing in Swift, a common task you may come across is comparing strings. However, did you know that using the .lowercased() method might not be the best way to do it? Let's take a look at an example where we compare two strings using .lowerc...

2 min read · [huypham85.hashnode.dev](https://huypham85.hashnode.dev/stop-using-lowercased-to-compare-strings-in-swift?utm_source=hashnode&utm_medium=feed)
