Skip to content

Mastering iOS

A developer's search for code greatness

Menu

Primary menu

  • Home

Category Archives: Good Practices

The Boy Scout Rule

Posted on May 12, 2018 by Vasilica Zmeu — No Comments ↓

Leave the code cleaner than you found it. – Uncle Bob The Boy Scout Rule is one of my favorite clean code rule. It takes a different mindset to apply it. The code becomes shared responsibility. You don’t reach out Continue reading The Boy Scout Rule→

Posted in Clean Code, Good Practices | Tagged boy scout rule, clean code, good development practice, ios development | Leave a reply

Avoid strong reference cycles

Posted on March 6, 2014 by Vasilica Zmeu — 3 Comments ↓

With the introduction of ARC, memory management became easier. However, even though you don’t have to worry about when to retain and release, there are still a few rules you need to know in order to avoid memory problems. In Continue reading Avoid strong reference cycles→

Posted in Basics, Good Practices | 3 Replies

Constants in Objective C

Posted on November 29, 2013 by Vasilica Zmeu — No Comments ↓

When you’re building an app you usually need some values to remain the same for the whole runtime of the app. Instead of using those values everywhere inside your app it is better to define a constant and use the constant instead. Continue reading Constants in Objective C→

Posted in Basics, Good Practices | Leave a reply

Should IBOutlets be weak or strong?

Posted on September 20, 2013 by Vasilica Zmeu — 3 Comments ↓

You might have noticed that when you insert an IBOutlet directly from Interface Builder you can select whether to have it as a weak or strong property. After a little search in the Apple developer’s library I have found when Continue reading Should IBOutlets be weak or strong?→

Posted in Good Practices | 3 Replies

Use copy for NSString properties

Posted on September 19, 2013 by Vasilica Zmeu — No Comments ↓

When you declare a NSString property it is best to use copy instead of strong. In fact this is true for any immutable class that conforms to the NSCopying protocol like NSNumber, NSArray, NSSet and others. All these classes I Continue reading Use copy for NSString properties→

Posted in Good Practices | Leave a reply

Primary Sidebar Widget Area

Categories

  • Basics
  • Clean Code
  • Good Practices
  • iOS 7
  • iOS 8
  • Step by Step Tutorials
  • Swift
  • Tips & Tricks
  • UI Elements

Recent Posts

  • The Boy Scout Rule
  • Reading a file in Swift
  • Alerts and action sheets in iOS 8
  • Swift Fun with Timers and GCD
  • 6 things I love about the Swift programming language

Archives

  • May 2018 (1)
  • September 2016 (1)
  • April 2015 (1)
  • March 2015 (4)
  • February 2015 (2)
  • October 2014 (1)
  • July 2014 (1)
  • June 2014 (1)
  • March 2014 (1)
  • December 2013 (2)
  • November 2013 (2)
  • October 2013 (5)
  • September 2013 (3)
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
Copyright © 2023 Mastering iOS. All Rights Reserved.
Theme: Catch Box by Catch Themes
Scroll Up
Enter your name and email to receive new awesome Swift tutorials.
Your information will *never* be shared or sold to a 3rd party.