Skip to content

iOS Dev blog

about creating mobile applications but also a bit about my interests

  • Home
  • About me

Category: swift tips

swift tips

private(set) modifier

April 3, 2021April 3, 2021 TomekLeave a Comment on private(set) modifier

Sometimes there is a need to use or test some property outside the enclosing declaration (internal get). At the same time, you don’t want this property to be modified outside – because, by applying good practices and for safety reasons,…

Read More→

swift tips

Be careful about getting elements from an array

January 19, 2021January 24, 2021 TomekLeave a Comment on Be careful about getting elements from an array

You have to remember that in Swift, if you try to access an index that is out of bounds, you will get a runtime error (EXC_BAD_INSTRUCTION) and the application will crash. Currently, Swift Array type doesn’t have a safe method…

Read More→

swift tips

Can encoding a String to Data with utf8 fail?

January 14, 2021January 14, 2021 TomekLeave a Comment on Can encoding a String to Data with utf8 fail?

Surely none of us programming in Swift likes force-unwrapping optional values too much (we prefer a ‘guard’ – although excessive use is also not quite the right approach). Quick reminder for beginners: optionals represent data that may or may not…

Read More→

Recent Posts

  • SwiftUI: Is It Time? 
  • private(set) modifier
  • How to generate secure random data?
  • Be careful about getting elements from an array
  • A few words about automatically generated screenshots

Recent Comments

    Archives

    • October 2023
    • April 2021
    • January 2021

    Categories

    • ios app security
    • swift tips
    • SwiftUI

    Author

    Tomek

    Tomek

    passions: IT world of course, app development, football, gym, street workout, tourism

    Copyright © 2021 TomekI. All rights reserved.
    Artblog by iThemer
    Go to top